src: Yearly copyright bump This time on time!
src: Yearly copyright bump Let's welcome 2020.
common: Always let QVariant::fromValue() deduce the type In some places, we would explicitly give the type to QVariant::fromValue(), forgoing automatic type deduction. This is almost always redundant, and in the cases where it is not, the input type should be explicitly cast. Additionally, the implementation of QVariant::fromValue() subtly changed in Qt 5.14, leading to compile errors when giving a non-decayed type (as we did in SignalProxy::attachSignal()).
src: Yearly copyright bump ... and it's still January!
modernize: Reformat ALL the source... again! It's been more than six years since we last used an autoformatter on the codebase. Tooling has progressed, so has the language and of course our personal preferences. Use clang-format this time to reformat the whole codebase, following the rules laid out in .clang-format (which one can use for configuring an IDE, too, if it supports autoformatting). Overall, the new style is not too different from what we used before, with one significant change: We now attach pointer/reference indicators (*&) to the type rather than the name, i.e. we left-align. While this is a major deviation from the Qt style which we use for almost everything else, it aligns more closely with many other projects, as well as the C++ documentation and STL. It also makes more sense semantically, because */& are really part of the type. Other changes include (but are not limited to): - Use only one blank line between function definitions - Categorize includes from generic/system to local, sorting each category alphabetically. The generic-to-local sort order seems to be more common than the other way round, so we use that. - In .cpp files, the corresponding header is always included first. This is a general recommendation, because it makes it harder to accidentally introduce a reliance on transitive includes in headers. - Consistently break initializers in ctors before the comma, so the commas are left-aligned together with the colon. - Use two spaces between code and trailing comments. Note that sometimes even clang-format gets things wrong. In a few places, formatting was manually fixed; however, reviewing a diff of almost 80k lines is a rather boring task, so we didn't thoroughly go through all the changes. Wrong formatting can always be fixed in follow-up commits, anyway. Note also that we don't intend to re-run clang-format on a regular basis, nor do we want to religiously follow a hardcoded set of rules for new code in the future. Where it makes sense, the rules may be bent in favor of better readability or more pleasing code.
modernize: Replace most remaining old-style connects by PMF ones Manually replace old-style connects (using the SIGNAL/SLOT macros) by the much more efficient and typesafe pointer-to-member-function- based ones. This fixes the cases where clazy could not auto-migrate to the new syntax for a variety of reasons. In most of the cases, we need to remove overloads or explicitly select the desired one, because the plain syntax cannot deal with overloads. Another issue is trying to connect to signals in a baseclass that are only declared in a derived class (which works with the old-style runtime connection handling, but obviously no longer with the compile-time version). Also do some selected cleanups in places.
clazy: Convert many old-style connects into function pointer based Since Qt5, signal/slot connections can be expressed using function pointers rather than the SIGNAL/SLOT macros. This is a) much more efficient, and b) provides a compile-time check for the sender and receiver being compatible. Let clazy auto-fix old-style connects where it can. However, a lot of occurrences remain where we'll need manual intervention for one reason or another.
modernize: Use auto where the type is clear from context Apply clang-tidy's modernize-use-auto fix, which uses auto where the type would otherwise be duplicated in the line (e.g. when casting a type, or creating an instance with 'new').
modernize: Use '= default' instead of empty ctor/dtor bodies Also remove lots of unnecessary, empty ctors and dtors.
icons: Warn on missing icons Provide new helper functions icon::get() that replace the uses of QIcon::fromTheme. These functions still use fromTheme() internally, but log a warning if an icon could not be found. This should make it easier to detect problems with icons. Replace all uses of QIcon::fromTheme() with icon::get(), remove useless fallbacks as that should be taken care of by the normal icon loader mechanism. Update the icon import script accordingly.
Semi-yearly copyright bump It's no longer 2016.
Add function to "(Dis-)Connect from/to all" in connection dropdown If I'm not mistaken there needs to be one ActionType per different button layout (with icon/text only)...
Bring copyright headers into 2016 That took some time...
Happy New Year!
Remove the obsolete Icon and IconLoader classes Removing (hopefully) all traces of the now obsolete icon loading support.
Use Qt's native icon theme support rather than our own For the longest time, we've had our own icon loader (or used KDE's) in order to provide rudimentary icon theme support. However, since 2009, Qt has had native support for loading icons from themes. In recent version (due to platform integration etc.), proper icon theme support has gotten much more complex too... things like theme inheritance, proper fallback policies, specialized states and so on have never been supported by our simple custom icon loader. This commit switches all icon loading to QIcon::fromTheme(). The downside is that we have little control about Qt's icon loader, which may cause issues with some of the non-standard icons we ship. In case of the native Qt icon loader being used, we define fallbacks that should find the extra icons. If you use Qt5 and have the KDE Frameworks integration plugin for Qt enabled, these fallbacks won't work unfortunately. If you see missing icons, you may have to install Quassel's 'hicolor' icons into /usr/share/icons/hicolor so they get picked up. For non-Linux platforms, we recommend using the bundled Oxygen icon set (this is the default).
Happy New Year!
Yearly bump It's 2013, baby!
Fix ALL the license headers! Many of our license headers had the wrong date, some of them inconsistent formatting, all of them the wrong address for the FSF (which apparently moved since 2005), and also neither the GNU Blank Public License nor the GNU Highlight Public License actually exist.
Reformat ALL the source! Yes, yes. After stubborningly refusing to switch to a more readable coding style for years, I finally give in. Our old, quite compact, 2-indent style was born from my time with homecomputers, where every whitespace was a waste. Later (and mostly thanks to EgS), I did see the light, e.g. changed from one-letter variable names to useful ones, but still shied away from reformatting the whole source, touching every line, destroying the historical context as shown by svn and git blame. However, since I'm now doing Qt-related programming as my day job, and use a proper (Qt-like) coding style there, it has become increasingly annoying for myself to switch to another style in those long hacking nights working on Quassel, and so I decided to Just Do Itâ„¢. Helps that Git nowadays can ignore whitespace changes when blaming, or diffing, or patching, so this shouldn't be too much of an annoyance for existing patches. Feedback from the community was also positive... So now we use a style that should be pretty close to the Qt Coding Style [1], which not only covers the indentation, but also things like newline-after-function-head. Reformatting was done automagically using uncrustify [2], a script and config file is in scripts/manage/. Please don't run it over the whole codebase again, as there are some false positives and weird formattings that will have to be manually fixed over time. You can use it for reformatting existing patches or MRs, though. [1] http://qt-project.org/wiki/Qt_Coding_Style [2] http://uncrustify.sourceforge.net/