Version: unspecified (using KDE 4.4.4) OS: Linux I am building a C++ program with the Kate build plug-in. If compilation of a program was successful, but there were compiler warnings, termination of the build process is reported by a little window saying 'Make results: Warnings/Errors found'. If the compiler output is large, it is not obvious to see whether compilation aborted or whether there were only a few warnings. It would be nice if the message could be more specific and say only 'Make results: Warnings found' if there were no errors. As an aside, it would be nice if the outcome of the last compilation run could be quickly visible (say, by some symbol), even after the notification window has disappeared. Reproducible: Didn't try
Created attachment 52802 [details] Patch for the kate build plugin that improves the content of some message boxes, as requested in 242503
I wrote a patch that implements the requested behavior. The build plugin now counts the number of errors and warnings. The message window mentions errors and warnings only if there have actually been errors and warnings, respectively. If there have been, reasonably precise numbers are given. Please review the patch and apply it if it meets your standards. Thanks.
Hey Oliver, I'd personally just use "if (m_num_errors_found)" instead of checking for > 0 all the time. Also camel cased variable names are preferred: m_numErrors and m_numWarnings is imo better. And the part with the passive popup is not looking good to me. It should always use i18np. And it would be simpler if you do it like this: if (m_numErrors || m_numWarnings) { QStringList msgs; if (m_numErrors) { msgs << i18np("Found one error.", "Found %1 errors.", m_numErrors); } if (m_numWarnings) { msg << i18np("Found one warning.", "Found %1 warnings.", m_numErrors); } KPassivePopup::message(i18n("Make Results"), msgs.join("\n"), m_toolView); } Otherwise good job :) If you fix the above stuff I'll happilly merge the patch. Bye
Hi Milian! Thanks for the review. I attach a revised patch, which includes all of your suggestions. -- Oliver
Created attachment 52838 [details] Revised patch for wishlist item 242503
committed to git, thanks
SVN commit 1191596 by cullmann: mwolff: Show amount of compile errors and warnings in popup of build plugin. Thanks for the patch to Oliver Sander. BUG: 242503 M +21 -13 plugin_katebuild.cpp M +2 -1 plugin_katebuild.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1191596