Feed Advanced Search

Aug 25 2017

dkurz created D7548: Prevent tag name vs gid confusion.
Aug 25 2017, 9:06 PM · KDE PIM

Aug 24 2017

dkurz added inline comments to D7501: Korganizer can use CollectionColorAttributes for calendar colors.
Aug 24 2017, 6:59 AM · KDE PIM
dkurz added inline comments to D7500: Event view can use the CollectionColorAttribute color.
Aug 24 2017, 6:52 AM · KDE PIM

Aug 23 2017

dkurz committed R165:5e8f6c1dd671: Add needed columns to QueryBuilder explicitly (authored by dkurz).
Add needed columns to QueryBuilder explicitly
Aug 23 2017, 8:53 PM
dkurz closed D7492: Add needed columns to QueryBuilder explicitly by committing R165:5e8f6c1dd671: Add needed columns to QueryBuilder explicitly.
Aug 23 2017, 8:53 PM · KDE PIM
dkurz retitled D7492: Add needed columns to QueryBuilder explicitly from Read correct query column indices when fetching tags to Add needed columns to QueryBuilder explicitly.
Aug 23 2017, 8:48 PM · KDE PIM
dkurz added a comment to D7492: Add needed columns to QueryBuilder explicitly.

Now that was fast. Thanks for the fast reply. Trying arc land...

Aug 23 2017, 8:38 PM · KDE PIM
dkurz added a comment to D7492: Add needed columns to QueryBuilder explicitly.

I'll also update the commit message before I push this; my local changes somehow didn't make it through arcanist.

Aug 23 2017, 8:36 PM · KDE PIM
dkurz updated the diff for D7492: Add needed columns to QueryBuilder explicitly.

Added column names explicitly

Aug 23 2017, 8:31 PM · KDE PIM
dkurz added a comment to T6854: Modernizing Kontact look.

Where is the header from folderview? If we don't have it we don't have access to column settings as "size icon" as "show unread"/show size etc. We can't hide/show tooltip etc.

Aug 23 2017, 8:15 PM · VDG, KDE PIM
dkurz added a comment to T6854: Modernizing Kontact look.

+1 for any attempts to modernize Kontact, and of course for even starting a discussion about it!

Aug 23 2017, 7:16 PM · VDG, KDE PIM
dkurz added a comment to D7492: Add needed columns to QueryBuilder explicitly.

Yay, I used arcanist to create a review request for the first time!

Aug 23 2017, 6:50 PM · KDE PIM
dkurz created D7492: Add needed columns to QueryBuilder explicitly.
Aug 23 2017, 6:45 PM · KDE PIM

Aug 21 2017

dkurz closed D7110: Avoid mem allocs by using stack allocated initializer lists.
Aug 21 2017, 6:04 PM · KDE PIM
dkurz closed D7112: Remove raw pointer member that was never read.
Aug 21 2017, 6:04 PM · KDE PIM
dkurz closed D7107: Move QMenu allocation from heap to stack.
Aug 21 2017, 6:03 PM · KDE PIM
dkurz committed R206:9c883f1de2bc: Move QMenu allocation from heap to stack (authored by dkurz).
Move QMenu allocation from heap to stack
Aug 21 2017, 6:03 PM
dkurz committed R206:4d7c0948c530: Avoid mem allocs by using stack allocated initializer lists (authored by dkurz).
Avoid mem allocs by using stack allocated initializer lists
Aug 21 2017, 6:03 PM
dkurz committed R206:5684cff5b77a: Remove raw pointer that was never read (authored by dkurz).
Remove raw pointer that was never read
Aug 21 2017, 6:03 PM

Aug 18 2017

dkurz added a comment to D7387: Save calendar colors immediately rather than on exit..

What happens if the user sets the color back to default? We wouldn't get past line 760, and disableColor() wouldn't be called, so the color would not be saved immediately, right?

Aug 18 2017, 4:13 PM · KDE PIM

Aug 15 2017

dkurz added a comment to D7285: pim-sieve-editor: sieveeditormainwindow: use QPointer to protect crash of ImportImapSettingWizard.

yep but here we didn"t use data from wizard so I don't see where it can crash

Aug 15 2017, 9:01 AM · KDE PIM
dkurz added a comment to D7291: pimcommon: autocorrectionwidget - QPointer guard dialogs.

Objects that live on the stack should not be subject to heap memory management; something that definitively hasn't changed. Memory management in Qt is already quite confusing. This change supports local reasoning about the code. This easily outweighs the micro performance hit.

Aug 15 2017, 8:54 AM · KDE PIM

Aug 11 2017

dkurz closed D7108: Prevent stopping search job after it finished.
Aug 11 2017, 8:06 AM · KDE PIM
dkurz added a comment to D7107: Move QMenu allocation from heap to stack.

So now we have readability, memory safety and performance on the plus side. To further back my performance claim, [1] investigates the difference between stack and heap allocation. Short answer: depends on the platform, but stack allocation can easily be faster by two orders of magnitude for a simple single-threaded program. KMail is multithreaded, so we can expect bigger differences: Heap allocation causes threads to synchronize on most platforms, because the heap is a shared resource (see e.g. [2]). The kind of allocation also hints at the expected lifetime of an object (in C++; in Qt, this is somewhat questionable).

Aug 11 2017, 7:57 AM · KDE PIM

Aug 10 2017

dkurz committed R460:797fcc105b62: Simplify action enabled updates (authored by dkurz).
Simplify action enabled updates
Aug 10 2017, 4:30 PM
dkurz closed D7116: Simplify action-enabled updates.
Aug 10 2017, 4:11 PM · KDE PIM
dkurz committed R165:ffc2297b54c9: Remove wrong additional check (authored by dkurz).
Remove wrong additional check
Aug 10 2017, 4:09 PM
dkurz committed R165:8204dfb52ac1: Sync search updates using BlockingQueuedConnection (authored by dkurz).
Sync search updates using BlockingQueuedConnection
Aug 10 2017, 4:09 PM
dkurz closed D7115: Sync search updates using BlockingQueuedConnection.
Aug 10 2017, 4:07 PM · KDE PIM
dkurz closed D7114: Remove wrong additional check.
Aug 10 2017, 4:07 PM · KDE PIM
dkurz closed D7106: Simplify collecting multiple search folders.
Aug 10 2017, 3:47 PM · KDE PIM
dkurz closed D7105: Avoid heap allocations by using QList initializer lists.
Aug 10 2017, 3:47 PM · KDE PIM
dkurz closed D7113: Remove unused include.
Aug 10 2017, 3:47 PM · KDE PIM
dkurz closed D7122: Bring HACKING up to date.
Aug 10 2017, 3:46 PM · KDE PIM
dkurz committed R206:f2115095749d: Simplify collecting multiple search folders (authored by dkurz).
Simplify collecting multiple search folders
Aug 10 2017, 3:45 PM
dkurz committed R206:f919e137b3be: Prevent stopping search job after it finished (authored by dkurz).
Prevent stopping search job after it finished
Aug 10 2017, 3:45 PM
dkurz committed R206:5be7563b978c: Remove unused include (authored by dkurz).
Remove unused include
Aug 10 2017, 3:45 PM
dkurz committed R206:4f34d80b5de4: Avoid heap allocations by using QList initializer lists (authored by dkurz).
Avoid heap allocations by using QList initializer lists
Aug 10 2017, 3:45 PM

Aug 9 2017

dkurz added a comment to D7122: Bring HACKING up to date.

Thanks a lot for supporting my application!

Aug 9 2017, 7:42 PM · KDE PIM
dkurz committed R206:79acd5fc0e8b: Bring HACKING up to date (authored by dkurz).
Bring HACKING up to date
Aug 9 2017, 7:36 PM

Aug 7 2017

dkurz added a comment to D7122: Bring HACKING up to date.

I still don't have write access, so it would be nice if someone could commit my 8 accepted patches (or help me get a Developer account).

Aug 7 2017, 1:25 PM · KDE PIM

Aug 4 2017

dkurz updated the diff for D7110: Avoid mem allocs by using stack allocated initializer lists.
Aug 4 2017, 11:45 AM · KDE PIM
dkurz added a comment to D7107: Move QMenu allocation from heap to stack.

But we still save an inefficient heap allocation. That's already useful in itself. And there's really no point in creating this QMenu on the heap here.

Aug 4 2017, 11:28 AM · KDE PIM
dkurz updated the diff for D7114: Remove wrong additional check.
Aug 4 2017, 11:10 AM · KDE PIM
dkurz added a comment to D7111: Create QMenu on the stack.

The reasoning is the same as in D7107. Additionally, we can see here how it simplifies memory management and prevents memory leaks: In line 2756, we had to remember to delete menu before we return. We can easily forget that, and now get it for free.

Aug 4 2017, 11:07 AM · KDE PIM
dkurz added a comment to D7110: Avoid mem allocs by using stack allocated initializer lists.

Yes, I saw the optimization for types that are not ::isLarge, but we still require the array. And your auto version removes the last three heap allocations, which is great. I'll update my diff accordingly.

Aug 4 2017, 10:58 AM · KDE PIM
dkurz added a comment to D7110: Avoid mem allocs by using stack allocated initializer lists.

It's the size of the container itself (and its heap allocations) that we reduce. The old code constructs an empty array list, and then calls operator<< n times. For every such call, QList allocates a new array on the heap, one element larger in size than the last one, and then moves the old contents to the new location. That's what I figured out by looking at QList's source code (QList::operator(t)<< calls QList::append(t) calls QListData::append() calls QListData::append(1), which does exactly what I just described) , but maybe I missed some mechanism that batch allocates more space than needed, just as QVector does. But even if it did, QList cannot know at the beginning of the << sequence how much space it would need eventually. So even with vectors' trick to allocate some constant fraction of the previously used amount of memory when size hits capacity, we would have log(n) memory allocations for n insertions. Using the ctor directly reduces this to only one heap allocation.

Aug 4 2017, 10:44 AM · KDE PIM
dkurz added a comment to D7107: Move QMenu allocation from heap to stack.

We save one heap allocation. Stack allocations are always cheaper. Also, we reduce the risk of a memory leak, when for some reason the "delete menu" isn't reached.

Aug 4 2017, 10:03 AM · KDE PIM
dkurz updated the diff for D7115: Sync search updates using BlockingQueuedConnection.
Aug 4 2017, 9:46 AM · KDE PIM
dkurz updated the diff for D7106: Simplify collecting multiple search folders.

You are right, we don't need qAsConst, since operator<< already takes a const&.

Aug 4 2017, 7:30 AM · KDE PIM

Aug 3 2017

dkurz created D7122: Bring HACKING up to date.
Aug 3 2017, 8:50 PM · KDE PIM
dkurz created D7116: Simplify action-enabled updates.
Aug 3 2017, 7:27 PM · KDE PIM
dkurz created D7115: Sync search updates using BlockingQueuedConnection.
Aug 3 2017, 7:23 PM · KDE PIM
dkurz created D7114: Remove wrong additional check.
Aug 3 2017, 7:22 PM · KDE PIM
dkurz created D7113: Remove unused include.
Aug 3 2017, 7:17 PM · KDE PIM
dkurz created D7112: Remove raw pointer member that was never read.
Aug 3 2017, 7:15 PM · KDE PIM
dkurz created D7111: Create QMenu on the stack.
Aug 3 2017, 7:13 PM · KDE PIM
dkurz created D7110: Avoid mem allocs by using stack allocated initializer lists.
Aug 3 2017, 7:11 PM · KDE PIM
dkurz created D7108: Prevent stopping search job after it finished.
Aug 3 2017, 7:08 PM · KDE PIM
dkurz created D7107: Move QMenu allocation from heap to stack.
Aug 3 2017, 7:05 PM · KDE PIM
dkurz created D7106: Simplify collecting multiple search folders.
Aug 3 2017, 7:04 PM · KDE PIM
dkurz created D7105: Avoid heap allocations by using QList initializer lists.
Aug 3 2017, 7:03 PM · KDE PIM
dkurz abandoned D2599: Don't delete ETMViewStateSaver manually.
Aug 3 2017, 5:37 PM · KDE PIM

Aug 29 2016

dkurz updated the diff for D2602: Fix possible memory leaks and dangling pointers.

With raw pointers, we have no way of telling if an object on the heap was deleted by its parent. On the other hand, QPointers are reset to null, which is easily detectable. The Q_ASSERTs make sure that everything was deleted as intended, and they would not work with raw pointers, because they would definitely still point to the location where the deleted objects were once created.

Aug 29 2016, 7:41 AM · KDE PIM
dkurz updated the diff for D2600: Prevent double delete of FolderSelectionDialog.

Oh yes, you are of course right! Looking at other uses of QDialogs and all these checks "if (... && dlg)", I assumed that QDialogs destroy themselves eventually, but they don't.

Aug 29 2016, 7:21 AM · KDE PIM

Aug 28 2016

dkurz added a comment to D2602: Fix possible memory leaks and dangling pointers.

I tried to motivate the move from raw to QPointers with the memory bugs I found. First, mTreeFolderWidget was not reset to Q_NULLPTR after it was deleted, although this pointer is used in nine places in kmmainwidget.cpp to check if that widget exists, and to access it afterwards. Second, mFolderModel was reset to Q_NULLPTR in deleteWidgets, although it was not destroyed there, so that model leaked. Both problems would not have happened with QPointers. The Q_ASSERTs help find such wrong assumptions that we rely on now.

Aug 28 2016, 6:37 PM · KDE PIM
dkurz added a comment to D2599: Don't delete ETMViewStateSaver manually.

It doesn't work when I implemented it.

Aug 28 2016, 6:27 PM · KDE PIM

Aug 27 2016

dkurz added a comment to D2602: Fix possible memory leaks and dangling pointers.

Please note: I changed the type of some KMMainWidget members to QPointer<>. I wasn't entirely sure if this requires a PIM_VERSION bump again. Please tell me if it does.

Aug 27 2016, 10:23 AM · KDE PIM
dkurz retitled D2602: Fix possible memory leaks and dangling pointers from to Fix possible memory leaks and dangling pointers.
Aug 27 2016, 10:21 AM · KDE PIM
dkurz retitled D2601: Avoid double reparenting from to Avoid double reparenting.
Aug 27 2016, 10:16 AM · KDE PIM
dkurz retitled D2600: Prevent double delete of FolderSelectionDialog from to Prevent double delete of FolderSelectionDialog.
Aug 27 2016, 10:13 AM · KDE PIM
dkurz retitled D2599: Don't delete ETMViewStateSaver manually from to Don't delete ETMViewStateSaver manually.
Aug 27 2016, 10:11 AM · KDE PIM

Aug 24 2016

dkurz added a comment to D2434: Cache tags by name instead of gid.

Marked inline comment as done

Aug 24 2016, 6:39 AM · KDE PIM
dkurz updated the diff for D2434: Cache tags by name instead of gid.

Fix what was asked for. I assume it is sufficient to change the PIM_VERSION in the CMakeFile.txt of calendarsupport only, since PIM_VERSIONs between pim modules are already diverging.

Aug 24 2016, 6:37 AM · KDE PIM

Aug 19 2016

dkurz added a comment to D2433: Display selected, newly created tags.

I don't have commit access. Would someone please push this for me?

Aug 19 2016, 9:06 AM · KDE PIM
This is a test notification, sent at Fri, Aug 19, 10:45.
Aug 19 2016, 8:45 AM
This is a test notification, sent at Fri, Aug 19, 10:45.
Aug 19 2016, 8:45 AM

Aug 18 2016

dkurz updated the diff for D2423: Set initial categories for non-cached incidences correctly.

Just a slight simplification

Aug 18 2016, 7:17 AM · KDE PIM
dkurz updated the diff for D2423: Set initial categories for non-cached incidences correctly.

I adapted kolab's approach of a member variable for missing categories, which now also makes sure that a categorie do not get lost if the server could, for whatever reason, not create the corresponding missing tag.

Aug 18 2016, 6:56 AM · KDE PIM

Aug 15 2016

dkurz added a comment to D2423: Set initial categories for non-cached incidences correctly.
In D2423#45545, @knauss wrote:

We also did this on kolab branches already:

https://git.kolab.org/rKPbecae4738c14ef

Aug 15 2016, 5:19 PM · KDE PIM
dkurz updated the diff for D2434: Cache tags by name instead of gid.

It seems QString is just as hashable as QByteArray :-)

Aug 15 2016, 3:22 PM · KDE PIM

Aug 14 2016

dkurz updated the diff for D2434: Cache tags by name instead of gid.

The original methods of TagCache were restored in order not to break old code that relies on it. In order to avoid name-gid collisions and because of the fact that clients know whether they want to match gids or names, we maintain separate methods for the tag name and gid caches.

Aug 14 2016, 10:35 AM · KDE PIM

Aug 13 2016

dkurz retitled D2434: Cache tags by name instead of gid from to Cache tags by name instead of gid.
Aug 13 2016, 12:51 PM · KDE PIM
dkurz updated the diff for D2423: Set initial categories for non-cached incidences correctly.

I tried to implement all of knauss' remarks, but I encountered a race condition problem:

Aug 13 2016, 11:25 AM · KDE PIM
dkurz retitled D2433: Display selected, newly created tags from to Display selected, newly created tags.
Aug 13 2016, 11:24 AM · KDE PIM

Aug 12 2016

dkurz added a comment to D2423: Set initial categories for non-cached incidences correctly.

Just noticed: it should also fix Bug 357236

Aug 12 2016, 1:03 PM · KDE PIM
dkurz retitled D2423: Set initial categories for non-cached incidences correctly from to Set initial categories for non-cached incidences.
Aug 12 2016, 12:17 PM · KDE PIM