Commit graph

18563 commits

Author SHA1 Message Date
Frank Reininghaus
88272d5862 Two small optimizations in KFileItemModel::removeItems()
1. It seems that it really can happen that KFileItems that we get from
   the dir lister's itemsDeleted signal are not in the model any more,
   e.g., if a folder where hidden files are shown is left and a folder
   where hidden files are not shown is entered. There is no need to
   output warnings then.
2. Remove the emptiness-check for the KFileItemList at the beginning.
   Even in the unlikely event that we do get an empty list, we return
   just a few lines later in the code.
2013-02-03 23:28:57 +01:00
Frank Reininghaus
4cb6dfebb9 const QList<int> -> const QList<int>& 2013-02-03 23:19:58 +01:00
Frank Reininghaus
7631104c95 Remove unneeded #include 2013-02-03 23:12:55 +01:00
Script Kiddy
36db978920 SVN_SILENT made messages (.desktop file) 2013-02-01 13:25:28 +01:00
Script Kiddy
6ffd4d85ab SVN_SILENT made messages (.desktop file) 2013-02-01 08:45:36 +01:00
Burkhard Lück
3ed9800555 sync dolphin + konqueror filmanager docbook for 4.10 2013-02-01 06:14:45 +01:00
Script Kiddy
df5cccebb6 SVN_SILENT made messages (.desktop file) 2013-01-31 16:26:13 +01:00
Script Kiddy
d3b4f6bc19 SVN_SILENT made messages (.desktop file) 2013-01-31 11:52:42 +01:00
Frank Reininghaus
3e90a20ba9 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	dolphin/src/tests/kfileitemmodeltest.cpp
2013-01-30 21:06:34 +01:00
Frank Reininghaus
5a1d755919 Add unit test for bug 314046
The regression happened in the master branch only, but I think it
doesn't hurt to add the test to the stable branch.

CCBUG: 314046
2013-01-30 21:02:43 +01:00
Script Kiddy
298cb62728 SVN_SILENT made messages (.desktop file) 2013-01-30 16:21:26 +01:00
Script Kiddy
42f9401ca9 SVN_SILENT made messages (.desktop file) 2013-01-30 11:58:13 +01:00
Script Kiddy
ec68887d4b SVN_SILENT made messages (.desktop file) 2013-01-29 21:08:34 +01:00
Frank Reininghaus
e267a7b09e Update Dolphin version to 2.2 for KDE 4.10.0 2013-01-29 19:13:49 +01:00
Frank Reininghaus
8a8854a772 Fix crashes in KFileItemModel::removeItems()
These crashes were caused by the recent commit
ff3267c6dc. It introduced two problems:

a) A logic error in the code that removes the ItemData pointers from
   m_itemData that could cause crashes if multiple item ranges are
   removed, and there were un-removed items behind the last one.
b) The implicit assumption that any call of removeItems() will actually
   result in items being removed in the model. This is incorrect if
   the model is first cleared and then the hidden-files setting is
   modified, which happens if "Save view properties for each folder" is
   enabled, and a folder where hidden files are shown is left. In that
   case, the dir lister emits itemsDeleted for the hidden items after
   they have been removed from the model due to the folder change.

I'll add a unit test covering these issues soon.

Many thanks to Romário Rios and Hrvoje Senjan for testing!

BUG: 314046
2013-01-29 19:08:28 +01:00
Script Kiddy
60a3b94c93 SVN_SILENT made messages (.desktop file) 2013-01-29 16:50:08 +01:00
Script Kiddy
cf4b84a8f6 SVN_SILENT made messages (.desktop file) 2013-01-28 08:44:17 +01:00
Weng Xuetian
be750f79dc Merge branch 'KDE/4.10' 2013-01-27 14:13:04 -05:00
Weng Xuetian
8a97ca66ad escape the existing text instead of set to plain text
@info indicates it's rich text and will be added <html> tag by kdelibs,
so just escape the text that will be set to label for KDE/4.10

REVIEW: 108584
BUG: 313992
2013-01-27 14:09:12 -05:00
Frank Reininghaus
cf8a08fcd2 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	dolphin/src/tests/kfileitemmodeltest.cpp
2013-01-27 15:25:47 +01:00
Frank Reininghaus
3c926c0673 Move the consistency check for KFileItemModel from the test to the class
This makes it possible to check the model's consistency also in other
places, e.g., in KFileItemModel's benchmark.
2013-01-27 15:19:39 +01:00
Frank Reininghaus
4113dd0198 Add a unit test for a recently fixed crash
Before commit 90c7fd400c, adding a
KFileItem with an empty path caused a crash in
KFileItemModel::expandedParentsCountCompare().
2013-01-27 14:09:39 +01:00
Frank Reininghaus
ff3267c6dc Performance improvements in KFileItemModel::removeItems()
The performance of this method is improved by:
a) Not removing items one by one, but doing it in a way that minimizes
   the number of moves to prevent O(N^2) worst-case complexity.
b) Not sorting the removed items using the potentially extremely slow
   KFileItemModel::lessThan. We can get the indexes of the removed items
   very easily from the hash m_items, and sorting ints is a lot faster.
c) Preventing repeated rehashing of m_items when removing the deleted
   URLs by replacing remove() by erase().

REVIEW: 108540
2013-01-27 13:07:46 +01:00
Script Kiddy
435bc19c0e SVN_SILENT made messages (.desktop file) 2013-01-27 12:59:07 +01:00
Frank Reininghaus
d18e6f0a12 Add some benchmarks for KFileItemModel
The benchmark executable must be run manually. It is not run
automatically with the other unit tests to prevent waste of CPU cycles
in the not-so-uncommon situation that only test failures attract
attention.
2013-01-27 12:55:37 +01:00
Luca Beltrame
db89a99b7f Merge remote-tracking branch 'origin/KDE/4.10' 2013-01-24 23:49:59 +01:00
Vishesh Handa
af280715ff KFileItemModelRolesUpdater: Avoid multiple updates for Nepomuk data
The Nepomuk ResourceWatcher emits 3 signals - propertyChanged,
propertyAdded and propertyRemoved. We should only listen to either the
propertyChanged signal or the propertyAdded + Removed signals. There is
no point in listening to all 3 signals. That will just result in
unnecessary updates.

Additionally, we do not need to listen to the resourceCreated signal.
That is only emitted when we are watching for a specific types, which we
are not.

REVIEW: 108543
2013-01-24 23:16:27 +05:30
Frank Reininghaus
787116a96f Merge remote-tracking branch 'origin/KDE/4.10' 2013-01-24 09:39:33 +01:00
Yuri Chornoivan
148f17db88 Fix typo: diabled -> disabled 2013-01-24 07:44:38 +02:00
Burkhard Lück
38879704b3 dolphin doc update to 4.10 2013-01-23 23:17:34 +01:00
Frank Reininghaus
c10517314c Make the "A folder cannot be dropped into itself" message less intrusive
Showing this message in the KMessageWidget above the view, which means
that the view contents are moved down, can be extremely annoying
according to user feedback. Just showing the message in the status bar
is probably enough.

BUG: 313466
REVIEW: 108483
FIXED-IN: 4.10.0
2013-01-22 07:17:35 +01:00
Script Kiddy
a19d4cdd4f SVN_SILENT made messages (.desktop file) 2013-01-21 12:43:59 +01:00
Script Kiddy
d9c87da1eb SVN_SILENT made messages (.desktop file) 2013-01-21 08:16:28 +01:00
Script Kiddy
e62bf400b5 SVN_SILENT made messages (.desktop file) 2013-01-20 11:55:12 +01:00
Script Kiddy
c0784ee3f9 SVN_SILENT made messages (.desktop file) 2013-01-20 07:49:24 +01:00
Script Kiddy
3be00df4cb SVN_SILENT made messages (.desktop file) 2013-01-18 12:32:11 +01:00
Script Kiddy
e8260ebc81 SVN_SILENT made messages (.desktop file) 2013-01-18 08:05:47 +01:00
Script Kiddy
b273d42c4f SVN_SILENT made messages (.desktop file) 2013-01-17 12:48:56 +01:00
Script Kiddy
3c26839222 SVN_SILENT made messages (.desktop file) 2013-01-17 08:10:20 +01:00
Luca Beltrame
bd9de960b0 Merge remote-tracking branch 'origin/KDE/4.10' 2013-01-16 23:42:25 +01:00
Andrea Scarpino
26cf73dcac Allow Timeline-URLs as homepage
FEATURE: 313151
REVIEW: 108428
2013-01-16 23:16:10 +00:59
Andrea Scarpino
87a4eb9eaf Allow Timeline-URLs as homepage
FEATURE: 313151
REVIEW: 108428
2013-01-16 23:04:47 +00:59
Kai Uwe Broulik
99f200d21b Use proper IconSize for PlacesItemEditDialog's KIconButton
REVIEW: 108443
2013-01-16 22:54:32 +01:00
Script Kiddy
98bcd3af23 SVN_SILENT made messages (.desktop file) 2013-01-16 12:34:10 +01:00
André Marcelo Alvarenga
bd12613bac Remove extra spaces 2013-01-15 23:05:26 -02:00
Frank Reininghaus
53160d39ea Remove incorrect comments about the sorting functions
In fact, we could use the sorting functions provided by Qt or the STL.
The reason why we have our own is that we want to support parallel
sorting because sorting many items naturally by name can be expensive.
2013-01-15 19:07:36 +01:00
Frank Reininghaus
643c96787c Update Dolphin version to 2.1.98 for KDE 4.10 RC 3 2013-01-15 18:56:14 +01:00
Frank Reininghaus
ccbc991635 Re-organise the sorting code
The KFileItemModel-specific parts are now separated from the generic
ones, like the parallel sorting implementation.

REVIEW: 108386
2013-01-15 18:50:37 +01:00
Frank Reininghaus
62adc5e4ca Change the sort and merge functions to a more generic form.
This might make it easier to reuse the parallel sorting code. Moreover,
some the upperBound/lowerBound functions have been removed because
equivalents are provided by the STL.
2013-01-15 18:47:51 +01:00
Frank Reininghaus
0881c08326 Use std::rotate, rather than reversing three times
We need less code now, and moreover, the STL implementation of rotate
should be more efficient than three reverse() calls.
2013-01-15 18:44:42 +01:00