┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-02-27Merge remote-tracking branch 'origin/KDE/4.12' into KDE/4.13Frank Reininghaus
2014-02-27SVN_SILENT made messages (.desktop file)l10n daemon script
2014-02-25Show the correct icon size in the zoom slider tooltip.Emmanuel Pescosta
BUG: 305694 FIXED-IN: 4.12.3 REVIEW: 111197
2014-02-25Fix Bug 330605 - Dropbox plugin prevents git plugin from workingEmmanuel Pescosta
Use scoring to find the best matching plugin for the given directory. Thanks to Phil Schaf for testing this patch! BUG: 330605 FIXED-IN: 4.12.3 REVIEW: 116019
2014-02-24Make the handling of the "maximum text lines" setting more robustFrank Reininghaus
If the user sets a maximum number of text lines in the settings, this number was translated into a maximum height in pixels using QFontMetrics::lineSpacing() before this commit. In KStandardItemListWidgetInformant::itemSizeHint(), this maximum height limited the size that is reserved for the item. However, in KStandardItemListWidget::updateIconsLayoutTextCache(), the maximum height was translated back into a maximum number of lines, which limits the number of lines that are created using the QTextLayout. This approach could lead to problems if the real height of the layouted text is 1 pixel more or less than QFontMetrics::lineSpacing() times "number of lines". Now we do not store a "maximum height" inside the "maximum size" explicitly, but store a maximum number of lines and a maximum with (for Compact View) separately, and then use the number of lines also to calculate the required size in KStandardItemListWidgetInformant::itemSizeHint(). This should make sure that the correct height is reserved for each item. Thanks to Christoph Feck and Emmanuel Pescosta for helping to debug this problem and testing the patch. BUG: 323841 FIXED-IN: 4.13 REVIEW: 113871
2014-02-24Handle font and palette changes in Dolphin list views.Emmanuel Pescosta
Also update the font of the meta data widget in InformationPanelContent (smallest readable font). BUG: 329186 BUG: 315061 FIXED-IN: 4.13 REVIEW: 115958
2014-02-11Remove some unused functions.Emmanuel Pescosta
void KFileItemModel::slotClear(const KUrl& url) bool UpdateItemsThread::lockPlugin() <- Done with QMutexLocker void UpdateItemsThread::unlockPlugin() REVIEW: 115627
2014-02-11Ensure that KItemListViewLayouter always has a size hint resolverFrank Reininghaus
KItemListViewLayouter uses a KItemListSizeHintResolver to find out how much space the items will need in the view. Before this commit, the size hint resolver object could be changed at runtime, and it could also be null. However, we never made use of these possibilities, so all the code that checks if m_sizeHintResolver is null is actually not needed at all.
2014-02-07Fix includesChristophe Giboudeaux
2014-02-07Merge remote-tracking branch 'origin/KDE/4.12'Frank Reininghaus
2014-02-07Only initialize the hash m_items in KFileItemModel if it is neededFrank Reininghaus
Moreover, clear the entire hash if items are added or removed. This saves time and memory when loading a directory, and it fixes problems that might occur if the model is in an inconsistent state, such as crashes that can happen when we try to remove individual items from m_items. BUG: 329494 FIXED-IN: 4.13.0 REVIEW: 115432
2014-02-07Fix build if Baloo is not installedFrank Reininghaus
2014-02-06Port Dolphin to BalooVishesh Handa
Nepomuk is being replaced with Baloo
2014-02-06Set the Details View colummns width to the preferred column width, by ↵Emmanuel Pescosta
double-clicking the header grips. BUG: 293315 FIXED-IN: 4.13 REVIEW: 115503
2014-02-02Restore the URLs of both views correctly when restoring a sessionFrank Reininghaus
The problem was that we restored the URL of the right view while the left one is still active. When we received the signal urlChanged(KUrl& url) from the right URL navigator, we then set the URL of the active (i.e., left) view to 'url', such that both views showed the same URL. BUG: 330047 FIXED-IN: 4.12.3 REVIEW: 115406
2014-01-31Don't store the index of the file item in the ↵Emmanuel Pescosta
VersionControlObserver::ItemState, get the index of the file item on demand instead. Fixes some "old"-index problems, esp. when you copy/move around files while the version control thread is still running. FIXED-IN: 4.13 REVIEW: 115410
2014-01-30Always enable the "Create New..." menu if the URL is writableFrank Reininghaus
This commit works around the problem that KDirLister may not provide a "rootItem" for some kioslaves by setting up a KFileItem with the view URL and using this to find out if the URL is writable. BUG: 330001 CCBUG: 330015 REVIEW: 115405 FIXED-IN: 4.12.2
2014-01-22SVN_SILENT made messages (.desktop file)l10n daemon script
2014-01-22SVN_SILENT made messages (.desktop file)l10n daemon script
2014-01-21Merge remote-tracking branch 'origin/KDE/4.12'Frank Reininghaus
2014-01-21Use only one "directory contents counting" thread per processFrank Reininghaus
The pointer to QThread object is stored in a global variable, and each view increments/decrements a reference count when it starts/stops using the thread. If this thread reaches zero, the thread is stopped. Note that we cannot just use a smart pointer, like QSharedPointer, to manage the thread, because we must make sure that the thread is not running any more before the QThread is deleted. REVIEW: 115064
2014-01-20Don't show tooltips while inline-renaming.Emmanuel Pescosta
FIXED-IN: 4.12.2 REVIEW: 115146 BUG: 330126
2014-01-16Remove the "retrieved items" code from UpdateItemStatesThread and ↵Emmanuel Pescosta
VersionControlObserver. Showing an error message, makes no sense in this case - the user can see it when all items are "unversioned". The plugins still have the ability to show error/warning messages on real errors. (and only where it makes sense ;) REVIEW: 114992 FIXED-IN: 4.13
2014-01-15Use the QMap iterator instead of foreach(key, map.keys()) in ↵Emmanuel Pescosta
UpdateItemStatesThread::run() and in VersionControlObserver::slotThreadFinished(). So we get O(n) complexity instead of O(n*logn), and O(1) memory instead of O(n). Thanks to Thiago Macieira for providing this information. FIXED-IN: 4.13 REVIEW: 115018
2014-01-12Calculate all item size hints at once.Emmanuel Pescosta
The speed up is really small, but theses changes are mostly straightforward and make the code a bit nicer - break the KStandardItemListWidgetInformant::itemSizeHint beast into three smaller functions. FIXED-IN: 4.13 REVIEW: 112979
2014-01-12Update copyright yearFrank Reininghaus
2014-01-06Merge remote-tracking branch 'origin/KDE/4.12'Frank Reininghaus
2014-01-06Kill any running preview jobs before starting a new oneFrank Reininghaus
If loading a preview takes long, it was possible before this commit that a preview for a new item was requested before the first preview was shown. In that case, there was a race condition, and the first preview to arrive stayed in the Information Panel. This commit fixes this by keeping a pointer to the preview job and killing it before starting a new one. BUG: 250787 FIXED-IN: 4.12.1 REVIEW: 114561
2014-01-06Avoid calling KFileItemModel::index() in KFileItemModelRolesUpdaterFrank Reininghaus
KFileItemModel allows to find out the index of a KFileItem with its index(const KFileItem&) method. Calling this method is not extremely expensive, but it's also not free (it looks up the URL of the KFileItem in a QHash, i.e., it has to call qHash(QString) for the full URL). In KFileItemModelRolesUpdater, we sometimes converted the known index to a KFileItem and then back to an index in applyResolvedRoles(KFileItem). This patch fixes this by modifying applyResolvedRoles such that it takes the index directly as its argument. REVIEW: 114847
2013-12-29Merge remote-tracking branch 'origin/KDE/4.12'Frank Reininghaus
2013-12-29Remove redundant data from KItemListViewLayouter's ItemInfo structFrank Reininghaus
It is not necessary to save the position of each item as a QPointF because all items in a row will have the same y-coordinate, and all items in a column will have the same x-coordinate. Therefore, we can reduce the number of doubles that we store from (number of items) * 2 to (number of rows) + (number of colums) which is at least 50% less. REVIEW: 114460
2013-12-29Disable the "Create folder" action in read-only directoriesFrank Reininghaus
The action can be triggered, e.g., by pressing F10. BUG: 294054 FIXED-IN: 4.12.1 REVIEW: 114560
2013-12-22Merge remote-tracking branch 'origin/KDE/4.12'Frank Reininghaus
2013-12-22Fix crash when dragging children of expanded folders in Details ViewFrank Reininghaus
The problem was that the loop in KFileItemModel::createMimeData() which is supposed to find out if any parent of an item has been added to the QMimeData already (because it is not necessary to add the item in that case) did not loop through the parents of the item, but incorrectly replaced the local variable 'itemData' by its parent. BUG: 329119 REVIEW: 114562
2013-12-22Add unit test for KFileItemModel::createMimeData().Frank Reininghaus
The test verifies that creating the mime data for a child of an expanced folder does not cause a crash. The regression happenened in the master branch, but it doesn't hurt to have the test also in KDE/4.12. CCBUG: 329119
2013-12-22Update filtered items when the "refreshItems" signal is receivedFrank Reininghaus
This fixes the problem that the new file name is not shown in the view if an item is renamed while it is filtered. BUG: 329118 FIXED-IN: 4.12.1 REVIEW: 114459
2013-12-14Update the roles for filtered items if necessaryFrank Reininghaus
Since Dolphin 4.11, we store not only KFileItems, but also the corresponding ItemData struct for filtered items. This is required for keeping track of the parent-child relationships, and has the nice side effect that the ItemData need not be re-determined when the items are shown again. However, this can become a problem if the visible roles or the sort role change while some items are filtered. This is fixed by is fixed by clearing the QHash "values" for the filtered items if the visible roles change. The hash will be re-populated with all requested data as soon as the items are shown again and the data(int) method of the model is called. Moreover, before the items are inserted into the model after filtering, we have to make sure that the sort role "Permissions"/"User"/etc. is present in the hash "values". This is achieved by factoring out the code that currently does this job for new items in createItemDataList() into a new function, and calling this in insertItems(), because the same treatment is required for the previously filtered files. BUG: 328791 FIXED-IN: 4.12.1 REVIEW: 114266
2013-12-06Merge remote-tracking branch 'origin/KDE/4.12'Frank Reininghaus
2013-12-06Make KFileItemModel::createMimeData() fasterFrank Reininghaus
Moreover, this commit ensures that the order of the URLs in the QMimeData object is the same as the order of the items in the view. Selecting many items and copying them to the clipboard could take quite a bit of time. This is because we used KDirModel::simplifiedUrlList(urls) to remove child items from the list of URLs, and this function sorts the URLs internally to make it easier to find out which of them are child URLs. However, since commit 5c5d87fec44e7c5934e4b24060200173153f0ff4, the selected indices are already stored in ascending order, and this makes it easy to detect if an item is a child of the last item that has been added to the QMimeData. BUG: 283409 REVIEW: 113515 FIXED-IN: 4.13.0
2013-12-06Merge remote-tracking branch 'origin/KDE/4.11' into KDE/4.12Frank Reininghaus
2013-12-03Fix Bug 328262 - rename bug if you cancel when folder already existsEmmanuel Pescosta
Only connect the renamingFailed signal if there is no item with the new name in the model yet. BUG: 328262 FIXED-IN: 4.11.5 REVIEW: 114228
2013-12-02Lazy-load the item data also in Compact ViewFrank Reininghaus
The recent changes which prevent that all data for each item are saved in a QHash already when loading the folder (see https://git.reviewboard.kde.org/r/112725/), which save both memory and time, do not work yet in Compact View, because KItemListWidgetInformant::itemSizeHint() calls the model's data(int) method for every item, which then initializes the hash. This patch prevents that by accessing the file name directly if only the "Name" is shown in the view, just like it's done in Icons View. REVIEW: 113849
2013-11-21Merge remote-tracking branch 'origin/KDE/4.11' into KDE/4.12Frank Reininghaus
2013-11-21Fix incorrect geometry updates in KItemListContainerYichao Yu
When resizing the window and when KItemListContainer::updateGeometries is called before the scrollbar visibility is updated, a relayout is triggered in `m_controller->view()->setGeometry` which updates the scrollbar visibility and calls back to `KItemListContainer::updateGeometries` again. Since the first call, which has the wrong geometry (due to the incorrect scrollbar states), updates the geometries of the scene and viewport after the second call (which has the right geometry!!) returns, the final result is a size that corresponded to the old scrollbar state before this commit. This patch uses the new geometry of the view after updating it (since it might not be the size we put in) and therefore makes the sizes consistent. BUG: 327709 FIXED-IN: 4.11.4 REVIEW: 113939
2013-11-21Make the "Create New..." menu in the "item context menu" work againFrank Reininghaus
Since https://git.reviewboard.kde.org/r/111989/, the "Create New..." menu in the context menu that appears when right-clicking a folder was not a child of the DolphinMainWindow any more, but of the context menu itself. This is the reason why the dialog that asks for a file name when choosing one of the "Create New..." options disappeared immediately. This patch makes sure that the main window is the parent of the "Create New..." menu again. BUG: 327783 REVIEW: 113930
2013-11-19dolphinnewfilemenu.cpp is part of dolphinprivatePatrick von Reth
2013-11-18Merge remote-tracking branch 'origin/KDE/4.11' into KDE/4.12Frank Reininghaus
2013-11-18Fix scrollbar spacing when no scrollbar is visible in dolphin.Yichao Yu
Before this commit, Dolphin reserved space for the scrollbar spacing even when no scrollbar is visible resulting in a ugly gap in the view when: 1. the theme uses QStyle::SH_ScrollView_FrameOnlyAroundContents and 2. the theme has a positive PM_ScrollView_ScrollBarSpacing. QtCurve can have both while Oxygen have 1 but not 2. To reproduce the problem with Oxygen style. Replace the `width += ....` (which returns -2 or 0 for Oxygen) with `width += 2`. See more info here: https://github.com/QtCurve/qtcurve-qt4/issues/9#issuecomment-28630517 CCBUG: 306631 FIXED-IN: 4.11.4 REVIEW: 113902
2013-11-15Update the Places Panel entries when switching the languageFrank Reininghaus
Before this commit, we stored the translated "Places" in .kde4/share/apps/kfileplaces/bookmarks.xml. This was not intentional - it only happened because PlacesItem::updateBookmarkForRole(const QByteArray& role) always stored the translated text (returned by PlacesItem::text()) in the KBookmark. This is be fixed by first checking if the text() is equal to the translation of the text that is already stored in the KBookmark, and not updating it in that case. Note that we have to make sure that all "Places"-related use the same context "KFile System Bookmarks" to make that work. Thanks to Burkhard Lück and Albert Astals Cid for helping to fix this problem! BUG: 319282 FIXED-IN: 4.12.0 REVIEW: 113850
2013-11-14Merge remote-tracking branch 'origin/KDE/4.11' into KDE/4.12Frank Reininghaus