src: Yearly copyright bump This time on time!
client: Optionally ensure backlog on buffer show Add a default-enabled option to ensure backlog is available when showing a buffer, using the same logic as scrolling up in a buffer whenever switching to a buffer. No additional messages will be fetched if the scrollbar is already visible. This makes using Quassel without any initial backlog fetching more convenient, as you don't need to scroll upon clicking every buffer. Note: if all loaded messages are filtered out, nothing will appear to be visible on the first showing, and more backlog will be fetched the next time the buffer is shown (or if scrolled, like before). This happens with Quassel today already, anyways, but implementing "fetch until visible" be a good future improvement, mirroring what Quasseldroid does.
src: Yearly copyright bump Let's welcome 2020.
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: Use override instead of virtual Let clang-tidy fix all occurrences where override should be used instead of virtual. Also, let it annotate member functions where virtual was missing in the first place.
modernize: Use nullptr Let clang-tidy fix all occurrences where nullptr should be used instead of 0.
src: Mark symbols to be exported where needed Generate export headers for the Quassel modules, and mark all relevant classes and function to be exported so that shared libraries can be linked against without globally exporting all symbols. This is a hard requirement for Windows DLLs, and more efficient on other platforms, too. For now, this was done incrementally until everything linked properly. In the future, we may consider explicitly defining the public interfaces for each module, and trying to minimize the linker interface e.g. by PIMPLing.
Semi-yearly copyright bump It's no longer 2016.
Bring copyright headers into 2016 That took some time...
Happy New Year!
Implement issue #1219: Update the marker line when quassel loses focus Solves issue #1219 on bugs.quassel-irc.org. We now listen for QEvent::WindowDeactivate in the main window. This should pickup on window closing/minimizing/losing focus. We also change view->setMarkerLine() to Client::setMarkerLine which will send an event to the syncher, and eventually arrives at ChatView::markerLineSet, which moves the marker line for us.
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/
Add shortcut that jumps to the markerline By default (and subject to change), Ctrl+K now jumps to the markerline (which is either set manually by Ctrl+R, or by default automatically when switching channels). If necessary, additional backlog will be fetched first. Note that this might require multiple presses of Ctrl+K if you tinkered with message filters after setting the markerline, and also for markerlines that have been set using older clients. The markerline will now never be set on a day change message.
Refactor the markerline into a proper QGraphicsWidget Unitl now, ChatLines would check if they're the one supposed to display the markerline for every paintEvent, and the one appropriate would draw it then. Besides being inefficient, this also caused trouble with the more flexible markerline stuff introduced recently. Now the markerline is a proper QGraphicsWidget. It can be fully styled via a brush property: Palette { marker-line: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 red, stop: 0.1 transparent); } This lets it look identical to the "old" markerline and is hence the default now. Note that the height of the markerline object is equal to a single line of text (so this is the area you get to play in), unless the brush is set to a solid color, in which case it's a simple line 1px wide. This makes it look acceptable when using an older stylesheet. This commit also fixes a crash introduced with the markerline rewrite a few weeks ago.
Improve marker line behavior; allow manual setting (Ctrl+R) The marker line will now be set to the bottom of the current chatview rather than to the very bottom of the chatview when it makes sense. So if you didn't scroll all the way down, and switch channels, you can start off where you left reading. Also there's now an option to disable the automatic setting of the marker line completely. Using Ctrl+R, you can manually set the marker line to the bottom of the ChatView. This requires a recent core (older cores will still work, but only show the old behavior).
Yearly copyright bump :)