From ae935d36b1565dd9a763f022caac5863071711fa Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Tue, 20 Dec 2016 12:38:21 +0100 Subject: SVN_SILENT made messages (.desktop file) - always resolve ours In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop" --- src/views/versioncontrol/fileviewversioncontrolplugin.desktop | 1 - 1 file changed, 1 deletion(-) (limited to 'src/views') diff --git a/src/views/versioncontrol/fileviewversioncontrolplugin.desktop b/src/views/versioncontrol/fileviewversioncontrolplugin.desktop index cdec01b9d..67951cfe7 100644 --- a/src/views/versioncontrol/fileviewversioncontrolplugin.desktop +++ b/src/views/versioncontrol/fileviewversioncontrolplugin.desktop @@ -2,7 +2,6 @@ Type=ServiceType X-KDE-ServiceType=FileViewVersionControlPlugin Comment=Version Control Plugin for File Views -Comment[ast]=Complementu de control de versiones pa vistes de ficheros Comment[ca]=Connector de control de versions per a les vistes de fitxers Comment[ca@valencia]=Connector de control de versions per a les vistes de fitxers Comment[cs]=Modul pro správu verzí pro pohledy na soubory -- cgit v1.3 From 24ed38d77f4bc6db71ba2608452fa0cd401bddac Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Mon, 2 Jan 2017 14:52:37 +0100 Subject: Properly disable create_dir action in Trash `isFolderWritable` is set in DolphinView::updateWritableState() according to KFileItemListProperties::supportsWriting(). However, `writing=true` does not imply `makedir=true`, in an ioslave's .protocol file. An example is the trash protocol. So we need to enable the `create_dir` action only if the protocol is actually able to create folders. CCBUG: 332463 REVIEW: 129712 --- src/views/dolphinviewactionhandler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/views') diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index 858f9299b..5c0b49cd2 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "dolphindebug.h" @@ -486,7 +487,8 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown) void DolphinViewActionHandler::slotWriteStateChanged(bool isFolderWritable) { - m_actionCollection->action(QStringLiteral("create_dir"))->setEnabled(isFolderWritable); + m_actionCollection->action(QStringLiteral("create_dir"))->setEnabled(isFolderWritable && + KProtocolManager::supportsMakeDir(currentView()->url())); } KToggleAction* DolphinViewActionHandler::iconsModeAction() -- cgit v1.3 From 2a7090728b8ef897a523712f89c917302f2c6532 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 3 Jan 2017 09:45:33 +0100 Subject: [DolphinView] Update view palette on palette change Everything was handling palette change already but for the visual distinction between active and non-active view (in case of split view), a custom palette was set which was then never updated. This could be seen by the label text color changing but not the view background. Differential Revision: https://phabricator.kde.org/D3909 --- src/views/dolphinview.cpp | 35 ++++++++++++++++++++++------------- src/views/dolphinview.h | 2 ++ 2 files changed, 24 insertions(+), 13 deletions(-) (limited to 'src/views') diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 4105628ee..7d85fa240 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -211,19 +211,7 @@ void DolphinView::setActive(bool active) m_active = active; - QColor color = KColorScheme(QPalette::Active, KColorScheme::View).background().color(); - if (!active) { - color.setAlpha(150); - } - - QWidget* viewport = m_container->viewport(); - if (viewport) { - QPalette palette; - palette.setColor(viewport->backgroundRole(), color); - viewport->setPalette(palette); - } - - update(); + updatePalette(); if (active) { m_container->setFocus(); @@ -721,9 +709,30 @@ void DolphinView::stopLoading() m_model->cancelDirectoryLoading(); } +void DolphinView::updatePalette() +{ + QColor color = KColorScheme(QPalette::Active, KColorScheme::View).background().color(); + if (!m_active) { + color.setAlpha(150); + } + + QWidget* viewport = m_container->viewport(); + if (viewport) { + QPalette palette; + palette.setColor(viewport->backgroundRole(), color); + viewport->setPalette(palette); + } + + update(); +} + bool DolphinView::eventFilter(QObject* watched, QEvent* event) { switch (event->type()) { + case QEvent::PaletteChange: + updatePalette(); + break; + case QEvent::KeyPress: if (GeneralSettings::useTabForSwitchingSplitView()) { QKeyEvent* keyEvent = static_cast(event); diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index 0b0d8196d..fbe3a6376 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -762,6 +762,8 @@ private: QUrl viewPropertiesUrl() const; private: + void updatePalette(); + bool m_active; bool m_tabsForFiles; bool m_assureVisibleCurrentIndex; -- cgit v1.3 From 85121a8115c5a8b6b7c0a01073663d51bd64e6ae Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Sat, 14 Jan 2017 12:52:58 +0100 Subject: Don't overwrite custom icons for the show_hidden_files action BUG: 374508 FIXED-IN: 16.12.2 REVIEW: 129789 --- src/views/dolphinviewactionhandler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/views') diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index 5c0b49cd2..273bcdd76 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -482,6 +482,12 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown) QAction* showHiddenFilesAction = m_actionCollection->action(QStringLiteral("show_hidden_files")); showHiddenFilesAction->setChecked(shown); + // #374508: don't overwrite custom icons. + const QString iconName = showHiddenFilesAction->icon().name(); + if (!iconName.isEmpty() && iconName != QLatin1String("visibility") && iconName != QLatin1String("hint")) { + return; + } + showHiddenFilesAction->setIcon(QIcon::fromTheme(shown ? QStringLiteral("visibility") : QStringLiteral("hint"))); } -- cgit v1.3 From 1be2704214a9685fe85fdf65f30e4921eba0f2c9 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Wed, 18 Jan 2017 23:45:39 +0100 Subject: Port away from deprecated KIO::Job::ui() It's equivalent to KJob::uiDelegate() from kcoreaddons. --- src/dolphincontextmenu.cpp | 2 +- src/dolphinmainwindow.cpp | 2 +- src/kitemviews/kfileitemmodelrolesupdater.cpp | 2 +- src/panels/folders/folderspanel.cpp | 2 +- src/panels/folders/treeviewcontextmenu.cpp | 4 ++-- src/panels/information/informationpanel.cpp | 2 +- src/panels/information/informationpanelcontent.cpp | 2 +- src/panels/terminal/terminalpanel.cpp | 2 +- src/views/dolphinview.cpp | 2 +- src/views/renamedialog.cpp | 2 +- src/views/tooltips/tooltipmanager.cpp | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/views') diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 666b81c8d..bedb4cb80 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -160,7 +160,7 @@ void DolphinContextMenu::openTrashContextMenu() if (uiDelegate.askDeleteConfirmation(QList(), KIO::JobUiDelegate::EmptyTrash, KIO::JobUiDelegate::DefaultConfirmation)) { KIO::Job* job = KIO::emptyTrash(); KJobWidgets::setWindow(job, m_mainWindow); - job->ui()->setAutoErrorHandlingEnabled(true); + job->uiDelegate()->setAutoErrorHandlingEnabled(true); } } } diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index deb5d5e57..1dcae7ec4 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -723,7 +723,7 @@ void DolphinMainWindow::handleUrl(const QUrl& url) } else if (KProtocolManager::supportsListing(url)) { // stat the URL to see if it is a dir or not m_lastHandleUrlStatJob = KIO::stat(url, KIO::HideProgressInfo); - if (m_lastHandleUrlStatJob->ui()) { + if (m_lastHandleUrlStatJob->uiDelegate()) { KJobWidgets::setWindow(m_lastHandleUrlStatJob, this); } connect(m_lastHandleUrlStatJob, &KIO::Job::result, diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index 92a020003..6e1c3d3dd 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -907,7 +907,7 @@ void KFileItemModelRolesUpdater::startPreviewJob() KIO::PreviewJob* job = new KIO::PreviewJob(itemSubSet, cacheSize, &m_enabledPlugins); job->setIgnoreMaximumSize(itemSubSet.first().isLocalFile()); - if (job->ui()) { + if (job->uiDelegate()) { KJobWidgets::setWindow(job, qApp->activeWindow()); } diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp index 276cf5672..8b759d813 100644 --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -260,7 +260,7 @@ void FoldersPanel::slotRoleEditingFinished(int index, const QByteArray& role, co KIO::Job* job = KIO::moveAs(oldUrl, newUrl); KJobWidgets::setWindow(job, this); KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, {oldUrl}, newUrl, job); - job->ui()->setAutoErrorHandlingEnabled(true); + job->uiDelegate()->setAutoErrorHandlingEnabled(true); } } } diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp index ec4186db2..51fc229c1 100644 --- a/src/panels/folders/treeviewcontextmenu.cpp +++ b/src/panels/folders/treeviewcontextmenu.cpp @@ -201,7 +201,7 @@ void TreeViewContextMenu::moveToTrash() KIO::Job* job = KIO::trash(list); KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Trash, list, QUrl(QStringLiteral("trash:/")), job); KJobWidgets::setWindow(job, m_parent); - job->ui()->setAutoErrorHandlingEnabled(true); + job->uiDelegate()->setAutoErrorHandlingEnabled(true); } } @@ -213,7 +213,7 @@ void TreeViewContextMenu::deleteItem() if (uiDelegate.askDeleteConfirmation(list, KIO::JobUiDelegate::Delete, KIO::JobUiDelegate::DefaultConfirmation)) { KIO::Job* job = KIO::del(list); KJobWidgets::setWindow(job, m_parent); - job->ui()->setAutoErrorHandlingEnabled(true); + job->uiDelegate()->setAutoErrorHandlingEnabled(true); } } diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index 3f778b07a..16dc721b2 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -185,7 +185,7 @@ void InformationPanel::showItemInfo() // No item is hovered and no selection has been done: provide // an item for the currently shown directory. m_folderStatJob = KIO::stat(url(), KIO::HideProgressInfo); - if (m_folderStatJob->ui()) { + if (m_folderStatJob->uiDelegate()) { KJobWidgets::setWindow(m_folderStatJob, this); } connect(m_folderStatJob, &KIO::Job::result, diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index d519ff121..9478aaf45 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -195,7 +195,7 @@ void InformationPanelContent::showItem(const KFileItem& item) m_previewJob = new KIO::PreviewJob(KFileItemList() << item, QSize(m_preview->width(), m_preview->height())); m_previewJob->setScaleType(KIO::PreviewJob::Unscaled); m_previewJob->setIgnoreMaximumSize(item.isLocalFile()); - if (m_previewJob->ui()) { + if (m_previewJob->uiDelegate()) { KJobWidgets::setWindow(m_previewJob, this); } diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index da68210c1..e952f23a0 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -137,7 +137,7 @@ void TerminalPanel::changeDir(const QUrl& url) sendCdToTerminal(url.toLocalFile()); } else { m_mostLocalUrlJob = KIO::mostLocalUrl(url, KIO::HideProgressInfo); - if (m_mostLocalUrlJob->ui()) { + if (m_mostLocalUrlJob->uiDelegate()) { KJobWidgets::setWindow(m_mostLocalUrlJob, this); } connect(m_mostLocalUrlJob, &KIO::StatJob::result, this, &TerminalPanel::slotMostLocalUrlResult); diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 7d85fa240..f5ba63d1e 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1534,7 +1534,7 @@ void DolphinView::slotRoleEditingFinished(int index, const QByteArray& role, con KIO::Job * job = KIO::moveAs(oldUrl, newUrl); KJobWidgets::setWindow(job, this); KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, {oldUrl}, newUrl, job); - job->ui()->setAutoErrorHandlingEnabled(true); + job->uiDelegate()->setAutoErrorHandlingEnabled(true); if (!newNameExistsAlready) { // Only connect the result signal if there is no item with the new name diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index a514ede1e..c73f003a8 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -162,7 +162,7 @@ void RenameDialog::renameItem(const KFileItem &item, const QString& newName) KIO::Job * job = KIO::moveAs(oldUrl, newUrl); KJobWidgets::setWindow(job, widget); KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, {oldUrl}, newUrl, job); - job->ui()->setAutoErrorHandlingEnabled(true); + job->uiDelegate()->setAutoErrorHandlingEnabled(true); } void RenameDialog::slotAccepted() diff --git a/src/views/tooltips/tooltipmanager.cpp b/src/views/tooltips/tooltipmanager.cpp index 0636df795..404d6801c 100644 --- a/src/views/tooltips/tooltipmanager.cpp +++ b/src/views/tooltips/tooltipmanager.cpp @@ -130,7 +130,7 @@ void ToolTipManager::startContentRetrieval() KIO::PreviewJob* job = new KIO::PreviewJob(KFileItemList() << m_item, QSize(256, 256)); job->setIgnoreMaximumSize(m_item.isLocalFile()); - if (job->ui()) { + if (job->uiDelegate()) { KJobWidgets::setWindow(job, qApp->activeWindow()); } -- cgit v1.3 From 0aed243bebae72d85aa06032bdf2d6ba2b58141d Mon Sep 17 00:00:00 2001 From: Don Nguyen Date: Sat, 21 Jan 2017 00:04:38 +0100 Subject: Change "Date" to "Modified" and allow access to new "Accessed" time field This is merge of #128964 and #128942. This will impelement changing the "Date" field to "Modified" and allow a new "Accessed" time field to be available. This also includes changes to update configuration files. REVIEW: 129077 --- src/kitemviews/kfileitemlistwidget.cpp | 2 +- src/kitemviews/kfileitemmodel.cpp | 58 ++++++++++++++++++++-------------- src/kitemviews/kfileitemmodel.h | 4 +-- src/panels/places/placesitemmodel.cpp | 2 +- src/settings/viewpropertiesdialog.cpp | 2 +- src/tests/kfileitemmodeltest.cpp | 8 ++--- src/views/viewproperties.cpp | 31 ++++++++++++++++-- src/views/viewproperties.h | 6 ++++ 8 files changed, 78 insertions(+), 35 deletions(-) (limited to 'src/views') diff --git a/src/kitemviews/kfileitemlistwidget.cpp b/src/kitemviews/kfileitemlistwidget.cpp index 7e5b4bb13..e0548ab2a 100644 --- a/src/kitemviews/kfileitemlistwidget.cpp +++ b/src/kitemviews/kfileitemlistwidget.cpp @@ -80,7 +80,7 @@ QString KFileItemListWidgetInformant::roleText(const QByteArray& role, const KIO::filesize_t size = roleValue.value(); text = KFormat().formatByteSize(size); } - } else if (role == "date") { + } else if (role == "modificationtime" || role == "accesstime") { const QDateTime dateTime = roleValue.toDateTime(); text = QLocale().toString(dateTime, QLocale::ShortFormat); } else { diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index aaa628102..7e14baff0 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -328,7 +328,8 @@ QList > KFileItemModel::groups() const switch (typeForRole(sortRole())) { case NameRole: m_groups = nameRoleGroups(); break; case SizeRole: m_groups = sizeRoleGroups(); break; - case DateRole: m_groups = dateRoleGroups(); break; + case ModificationTimeRole: m_groups = timeRoleGroups(KFileItem::ModificationTime); break; + case AccessTimeRole: m_groups = timeRoleGroups(KFileItem::AccessTime); break; case PermissionsRole: m_groups = permissionRoleGroups(); break; case RatingRole: m_groups = ratingRoleGroups(); break; default: m_groups = genericStringRoleGroups(sortRole()); break; @@ -1532,12 +1533,20 @@ QHash KFileItemModel::retrieveData(const KFileItem& item, data.insert(sharedValue("size"), item.size()); } - if (m_requestRole[DateRole]) { + if (m_requestRole[ModificationTimeRole]) { // Don't use KFileItem::timeString() as this is too expensive when // having several thousands of items. Instead the formatting of the // date-time will be done on-demand by the view when the date will be shown. const QDateTime dateTime = item.time(KFileItem::ModificationTime); - data.insert(sharedValue("date"), dateTime); + data.insert(sharedValue("modificationtime"), dateTime); + } + + if (m_requestRole[AccessTimeRole]) { + // Don't use KFileItem::timeString() as this is too expensive when + // having several thousands of items. Instead the formatting of the + // date-time will be done on-demand by the view when the date will be shown. + const QDateTime dateTime = item.time(KFileItem::AccessTime); + data.insert(sharedValue("accesstime"), dateTime); } if (m_requestRole[PermissionsRole]) { @@ -1762,7 +1771,7 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b, const break; } - case DateRole: { + case ModificationTimeRole: { const QDateTime dateTimeA = itemA.time(KFileItem::ModificationTime); const QDateTime dateTimeB = itemB.time(KFileItem::ModificationTime); if (dateTimeA < dateTimeB) { @@ -1942,7 +1951,7 @@ QList > KFileItemModel::sizeRoleGroups() const return groups; } -QList > KFileItemModel::dateRoleGroups() const +QList > KFileItemModel::timeRoleGroups(KFileItem::FileTimes which) const { Q_ASSERT(!m_itemData.isEmpty()); @@ -1951,26 +1960,26 @@ QList > KFileItemModel::dateRoleGroups() const const QDate currentDate = QDate::currentDate(); - QDate previousModifiedDate; + QDate previousFileDate; QString groupValue; for (int i = 0; i <= maxIndex; ++i) { if (isChildItem(i)) { continue; } - const QDateTime modifiedTime = m_itemData.at(i)->item.time(KFileItem::ModificationTime); - const QDate modifiedDate = modifiedTime.date(); - if (modifiedDate == previousModifiedDate) { + const QDateTime fileTime = m_itemData.at(i)->item.time(which); + const QDate fileDate = fileTime.date(); + if (fileDate == previousFileDate) { // The current item is in the same group as the previous item continue; } - previousModifiedDate = modifiedDate; + previousFileDate = fileDate; - const int daysDistance = modifiedDate.daysTo(currentDate); + const int daysDistance = fileDate.daysTo(currentDate); QString newGroupValue; - if (currentDate.year() == modifiedDate.year() && - currentDate.month() == modifiedDate.month()) { + if (currentDate.year() == fileDate.year() && + currentDate.month() == fileDate.month()) { switch (daysDistance / 7) { case 0: @@ -1978,7 +1987,7 @@ QList > KFileItemModel::dateRoleGroups() const case 0: newGroupValue = i18nc("@title:group Date", "Today"); break; case 1: newGroupValue = i18nc("@title:group Date", "Yesterday"); break; default: - newGroupValue = modifiedTime.toString( + newGroupValue = fileTime.toString( i18nc("@title:group Date: The week day name: dddd", "dddd")); newGroupValue = i18nc("Can be used to script translation of \"dddd\"" "with context @title:group Date", "%1", newGroupValue); @@ -2002,18 +2011,18 @@ QList > KFileItemModel::dateRoleGroups() const } } else { const QDate lastMonthDate = currentDate.addMonths(-1); - if (lastMonthDate.year() == modifiedDate.year() && - lastMonthDate.month() == modifiedDate.month()) { + if (lastMonthDate.year() == fileDate.year() && + lastMonthDate.month() == fileDate.month()) { if (daysDistance == 1) { - newGroupValue = modifiedTime.toString(i18nc("@title:group Date: " + newGroupValue = fileTime.toString(i18nc("@title:group Date: " "MMMM is full month name in current locale, and yyyy is " "full year number", "'Yesterday' (MMMM, yyyy)")); newGroupValue = i18nc("Can be used to script translation of " "\"'Yesterday' (MMMM, yyyy)\" with context @title:group Date", "%1", newGroupValue); } else if (daysDistance <= 7) { - newGroupValue = modifiedTime.toString(i18nc("@title:group Date: " + newGroupValue = fileTime.toString(i18nc("@title:group Date: " "The week day name: dddd, MMMM is full month name " "in current locale, and yyyy is full year number", "dddd (MMMM, yyyy)")); @@ -2021,28 +2030,28 @@ QList > KFileItemModel::dateRoleGroups() const "\"dddd (MMMM, yyyy)\" with context @title:group Date", "%1", newGroupValue); } else if (daysDistance <= 7 * 2) { - newGroupValue = modifiedTime.toString(i18nc("@title:group Date: " + newGroupValue = fileTime.toString(i18nc("@title:group Date: " "MMMM is full month name in current locale, and yyyy is " "full year number", "'One Week Ago' (MMMM, yyyy)")); newGroupValue = i18nc("Can be used to script translation of " "\"'One Week Ago' (MMMM, yyyy)\" with context @title:group Date", "%1", newGroupValue); } else if (daysDistance <= 7 * 3) { - newGroupValue = modifiedTime.toString(i18nc("@title:group Date: " + newGroupValue = fileTime.toString(i18nc("@title:group Date: " "MMMM is full month name in current locale, and yyyy is " "full year number", "'Two Weeks Ago' (MMMM, yyyy)")); newGroupValue = i18nc("Can be used to script translation of " "\"'Two Weeks Ago' (MMMM, yyyy)\" with context @title:group Date", "%1", newGroupValue); } else if (daysDistance <= 7 * 4) { - newGroupValue = modifiedTime.toString(i18nc("@title:group Date: " + newGroupValue = fileTime.toString(i18nc("@title:group Date: " "MMMM is full month name in current locale, and yyyy is " "full year number", "'Three Weeks Ago' (MMMM, yyyy)")); newGroupValue = i18nc("Can be used to script translation of " "\"'Three Weeks Ago' (MMMM, yyyy)\" with context @title:group Date", "%1", newGroupValue); } else { - newGroupValue = modifiedTime.toString(i18nc("@title:group Date: " + newGroupValue = fileTime.toString(i18nc("@title:group Date: " "MMMM is full month name in current locale, and yyyy is " "full year number", "'Earlier on' MMMM, yyyy")); newGroupValue = i18nc("Can be used to script translation of " @@ -2050,7 +2059,7 @@ QList > KFileItemModel::dateRoleGroups() const "%1", newGroupValue); } } else { - newGroupValue = modifiedTime.toString(i18nc("@title:group " + newGroupValue = fileTime.toString(i18nc("@title:group " "The month and year: MMMM is full month name in current locale, " "and yyyy is full year number", "MMMM, yyyy")); newGroupValue = i18nc("Can be used to script translation of " @@ -2221,7 +2230,8 @@ const KFileItemModel::RoleInfoMap* KFileItemModel::rolesInfoMap(int& count) { 0, NoRole, 0, 0, 0, 0, false, false }, { "text", NameRole, I18N_NOOP2_NOSTRIP("@label", "Name"), 0, 0, false, false }, { "size", SizeRole, I18N_NOOP2_NOSTRIP("@label", "Size"), 0, 0, false, false }, - { "date", DateRole, I18N_NOOP2_NOSTRIP("@label", "Date"), 0, 0, false, false }, + { "modificationtime", ModificationTimeRole, I18N_NOOP2_NOSTRIP("@label", "Modified"), 0, 0, false, false }, + { "accesstime", AccessTimeRole, I18N_NOOP2_NOSTRIP("@label", "Accessed"), 0, 0, false, false }, { "type", TypeRole, I18N_NOOP2_NOSTRIP("@label", "Type"), 0, 0, false, false }, { "rating", RatingRole, I18N_NOOP2_NOSTRIP("@label", "Rating"), 0, 0, true, false }, { "tags", TagsRole, I18N_NOOP2_NOSTRIP("@label", "Tags"), 0, 0, true, false }, diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 717afb9a7..dc5746a89 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -280,7 +280,7 @@ private slots: private: enum RoleType { // User visible roles: - NoRole, NameRole, SizeRole, DateRole, PermissionsRole, OwnerRole, + NoRole, NameRole, SizeRole, ModificationTimeRole, AccessTimeRole, PermissionsRole, OwnerRole, GroupRole, TypeRole, DestinationRole, PathRole, // User visible roles available with Baloo: CommentRole, TagsRole, RatingRole, ImageSizeRole, OrientationRole, @@ -383,7 +383,7 @@ private: QList > nameRoleGroups() const; QList > sizeRoleGroups() const; - QList > dateRoleGroups() const; + QList > timeRoleGroups(KFileItem::FileTimes which) const; QList > permissionRoleGroups() const; QList > ratingRoleGroups() const; QList > genericStringRoleGroups(const QByteArray& typeForRole) const; diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index 25c4d51f6..8a02ead01 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -872,7 +872,7 @@ PlacesItem* PlacesItemModel::createSystemPlacesItem(const SystemBookmarkData& da props.setVisibleRoles({"text"}); } else if (data.url.scheme() == QLatin1String("timeline")) { props.setViewMode(DolphinView::DetailsView); - props.setVisibleRoles({"text", "date"}); + props.setVisibleRoles({"text", "modificationtime"}); } } } diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp index 7407042d7..c317ed052 100644 --- a/src/settings/viewpropertiesdialog.cpp +++ b/src/settings/viewpropertiesdialog.cpp @@ -303,7 +303,7 @@ void ViewPropertiesDialog::configureAdditionalInfo() visibleRoles.clear(); visibleRoles.append("text"); visibleRoles.append("size"); - visibleRoles.append("date"); + visibleRoles.append("modificationtime"); m_viewProps->setVisibleRoles(visibleRoles); } diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp index ac15693b6..59ff63069 100644 --- a/src/tests/kfileitemmodeltest.cpp +++ b/src/tests/kfileitemmodeltest.cpp @@ -882,8 +882,8 @@ void KFileItemModelTest::testSorting() // Sort by Date, descending m_model->setSortDirectoriesFirst(true); - m_model->setSortRole("date"); - QCOMPARE(m_model->sortRole(), QByteArray("date")); + m_model->setSortRole("modificationtime"); + QCOMPARE(m_model->sortRole(), QByteArray("modificationtime")); QCOMPARE(m_model->sortOrder(), Qt::DescendingOrder); QCOMPARE(itemsInModel(), QStringList() << "c" << "c-2" << "c-3" << "c-1" << "b" << "d" << "a" << "e"); QCOMPARE(itemsMovedSpy.count(), 1); @@ -892,7 +892,7 @@ void KFileItemModelTest::testSorting() // Sort by Date, ascending m_model->setSortOrder(Qt::AscendingOrder); - QCOMPARE(m_model->sortRole(), QByteArray("date")); + QCOMPARE(m_model->sortRole(), QByteArray("modificationtime")); QCOMPARE(m_model->sortOrder(), Qt::AscendingOrder); QCOMPARE(itemsInModel(), QStringList() << "c" << "c-2" << "c-3" << "c-1" << "e" << "a" << "d" << "b"); QCOMPARE(itemsMovedSpy.count(), 1); @@ -901,7 +901,7 @@ void KFileItemModelTest::testSorting() // Sort by Date, ascending, 'Sort Folders First' disabled m_model->setSortDirectoriesFirst(false); - QCOMPARE(m_model->sortRole(), QByteArray("date")); + QCOMPARE(m_model->sortRole(), QByteArray("modificationtime")); QCOMPARE(m_model->sortOrder(), Qt::AscendingOrder); QVERIFY(!m_model->sortDirectoriesFirst()); QCOMPARE(itemsInModel(), QStringList() << "e" << "a" << "c" << "c-1" << "c-2" << "c-3" << "d" << "b"); diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index 597baa293..ca52be890 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -35,7 +35,8 @@ namespace { const int AdditionalInfoViewPropertiesVersion = 1; const int NameRolePropertiesVersion = 2; - const int CurrentViewPropertiesVersion = 3; + const int DateRolePropertiesVersion = 4; + const int CurrentViewPropertiesVersion = 4; // String representation to mark the additional properties of // the details view as customized by the user. See @@ -123,6 +124,11 @@ ViewProperties::ViewProperties(const QUrl& url) : Q_ASSERT(m_node->version() == NameRolePropertiesVersion); } + if (m_node->version() < DateRolePropertiesVersion) { + convertDateRoleToModificationTimeRole(); + Q_ASSERT(m_node->version() == DateRolePropertiesVersion); + } + m_node->setVersion(CurrentViewPropertiesVersion); } } @@ -309,7 +315,7 @@ QList ViewProperties::visibleRoles() const && !visibleRoles.contains(CustomizedDetailsString); if (useDefaultValues) { roles.append("size"); - roles.append("date"); + roles.append("modificationtime"); } return roles; @@ -448,6 +454,27 @@ void ViewProperties::convertNameRoleToTextRole() update(); } +void ViewProperties::convertDateRoleToModificationTimeRole() +{ + QStringList visibleRoles = m_node->visibleRoles(); + for (int i = 0; i < visibleRoles.count(); ++i) { + if (visibleRoles[i].endsWith(QLatin1String("_date"))) { + const int leftLength = visibleRoles[i].length() - 5; + visibleRoles[i] = visibleRoles[i].left(leftLength) + "_modificationtime"; + } + } + + QString sortRole = m_node->sortRole(); + if (sortRole == QLatin1String("date")) { + sortRole = QStringLiteral("modificationtime"); + } + + m_node->setVisibleRoles(visibleRoles); + m_node->setSortRole(sortRole); + m_node->setVersion(DateRolePropertiesVersion); + update(); +} + bool ViewProperties::isPartOfHome(const QString& filePath) { // For performance reasons cache the path in a static QString diff --git a/src/views/viewproperties.h b/src/views/viewproperties.h index dc118e2d7..05b80f455 100644 --- a/src/views/viewproperties.h +++ b/src/views/viewproperties.h @@ -153,6 +153,12 @@ private: */ void convertNameRoleToTextRole(); + /** + * Provides backward compatibility with .directory files created with + * Dolphin < 16.11.70: Converts the old name-role "date" to "modificationtime" + */ + + void convertDateRoleToModificationTimeRole(); /** * Returns true, if \a filePath is part of the home-path (see QDir::homePath()). */ -- cgit v1.3 From e582b13f8485dc9c9fc4b23f72d007dc99deec9b Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 31 Jan 2017 20:50:47 +0100 Subject: Hide progress info for rename jobs in rename dialog When mass-renaming files, you could end up with a a gazillion notifications of a finished move job. This fixes this. Ideally we would have one job which had the rename jobs as subjobs to still get progress info for the overall task. Differential Revision: https://phabricator.kde.org/D4372 --- src/views/renamedialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/views') diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index a514ede1e..cf8f6885d 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -159,7 +159,7 @@ void RenameDialog::renameItem(const KFileItem &item, const QString& newName) widget = this; } - KIO::Job * job = KIO::moveAs(oldUrl, newUrl); + KIO::Job * job = KIO::moveAs(oldUrl, newUrl, KIO::HideProgressInfo); KJobWidgets::setWindow(job, widget); KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, {oldUrl}, newUrl, job); job->ui()->setAutoErrorHandlingEnabled(true); -- cgit v1.3 From e3ea9b558e59b48e8b4a0abf779677093fbfde50 Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Sun, 5 Feb 2017 05:58:09 +0100 Subject: SVN_SILENT made messages (.desktop file) - always resolve ours In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop" --- src/views/versioncontrol/fileviewversioncontrolplugin.desktop | 1 + 1 file changed, 1 insertion(+) (limited to 'src/views') diff --git a/src/views/versioncontrol/fileviewversioncontrolplugin.desktop b/src/views/versioncontrol/fileviewversioncontrolplugin.desktop index 67951cfe7..889c1232a 100644 --- a/src/views/versioncontrol/fileviewversioncontrolplugin.desktop +++ b/src/views/versioncontrol/fileviewversioncontrolplugin.desktop @@ -2,6 +2,7 @@ Type=ServiceType X-KDE-ServiceType=FileViewVersionControlPlugin Comment=Version Control Plugin for File Views +Comment[ar]=ملحقة تحكّم بالإصدارات لمناظير الملفّات Comment[ca]=Connector de control de versions per a les vistes de fitxers Comment[ca@valencia]=Connector de control de versions per a les vistes de fitxers Comment[cs]=Modul pro správu verzí pro pohledy na soubory -- cgit v1.3 From 230fe13d1fccf8c2ab09c0873c1cc4c733cfc3b4 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Sun, 5 Feb 2017 22:53:50 +0100 Subject: Port tooltips to KToolTipWidget Use the new KToolTipWidget class (introduced by kwidgetsaddons 5.30) as backend of ToolTipManager. FileMetaDataToolTip becomes a simple widget used as content of the tooltip. It is now possible to actually use the metadata widget shown inside the tooltips. Tooltips are now functional on Wayland as well. More information about KToolTipWidget in https://git.reviewboard.kde.org/r/129648/ BUG: 352276 BUG: 371223 FIXED-IN: 17.04.0 Closes T4980 Differential Revision: D4449 --- CMakeLists.txt | 2 +- src/views/dolphinview.cpp | 2 +- src/views/tooltips/filemetadatatooltip.cpp | 19 ------- src/views/tooltips/filemetadatatooltip.h | 8 +-- src/views/tooltips/tooltipmanager.cpp | 84 ++++-------------------------- src/views/tooltips/tooltipmanager.h | 10 +++- 6 files changed, 23 insertions(+), 102 deletions(-) (limited to 'src/views') diff --git a/CMakeLists.txt b/CMakeLists.txt index 814c00ff2..e3494f5a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ set (KDE_APPLICATIONS_VERSION_MICRO "70") set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}") set(QT_MIN_VERSION "5.5.0") -set(KF5_MIN_VERSION "5.21.0") +set(KF5_MIN_VERSION "5.30.0") set(ECM_MIN_VERSION "1.6.0") # ECM setup diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index f5ba63d1e..bfed3e847 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1021,7 +1021,7 @@ void DolphinView::slotItemHovered(int index) const QPoint pos = m_container->mapToGlobal(itemRect.topLeft().toPoint()); itemRect.moveTo(pos); - m_toolTipManager->showToolTip(item, itemRect); + m_toolTipManager->showToolTip(item, itemRect, nativeParentWidget()->windowHandle()); } emit requestItemInfo(item); diff --git a/src/views/tooltips/filemetadatatooltip.cpp b/src/views/tooltips/filemetadatatooltip.cpp index 0d58717d4..2fbba8b9c 100644 --- a/src/views/tooltips/filemetadatatooltip.cpp +++ b/src/views/tooltips/filemetadatatooltip.cpp @@ -47,9 +47,6 @@ FileMetaDataToolTip::FileMetaDataToolTip(QWidget* parent) : m_name(0), m_fileMetaDataWidget(0) { - setAttribute(Qt::WA_TranslucentBackground); - setWindowFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint); - // Create widget for file preview m_preview = new QLabel(this); m_preview->setAlignment(Qt::AlignTop); @@ -161,19 +158,3 @@ KFileItemList FileMetaDataToolTip::items() const return m_fileMetaDataWidget->items(); } -void FileMetaDataToolTip::paintEvent(QPaintEvent* event) -{ - QStylePainter painter(this); - QStyleOptionFrame option; - option.init(this); - painter.drawPrimitive(QStyle::PE_PanelTipLabel, option); - painter.end(); - - QWidget::paintEvent(event); -} - -void FileMetaDataToolTip::showEvent(QShowEvent *) -{ - KWindowEffects::enableBlurBehind(winId(), true, mask()); -} - diff --git a/src/views/tooltips/filemetadatatooltip.h b/src/views/tooltips/filemetadatatooltip.h index 379b025c8..1738e386c 100644 --- a/src/views/tooltips/filemetadatatooltip.h +++ b/src/views/tooltips/filemetadatatooltip.h @@ -37,8 +37,8 @@ namespace Baloo { #endif /** - * @brief Tooltip, that shows the meta information and a preview of one - * or more files. + * @brief Widget that shows the meta information and a preview of one + * or more files inside a KToolTipWidget. */ class FileMetaDataToolTip : public QWidget { @@ -69,10 +69,6 @@ signals: */ void metaDataRequestFinished(const KFileItemList& items); -protected: - virtual void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE; - virtual void showEvent(QShowEvent *) Q_DECL_OVERRIDE; - private: QLabel* m_preview; QLabel* m_name; diff --git a/src/views/tooltips/tooltipmanager.cpp b/src/views/tooltips/tooltipmanager.cpp index 404d6801c..d19e98c81 100644 --- a/src/views/tooltips/tooltipmanager.cpp +++ b/src/views/tooltips/tooltipmanager.cpp @@ -24,18 +24,22 @@ #include #include #include +#include #include #include #include #include #include +#include ToolTipManager::ToolTipManager(QWidget* parent) : QObject(parent), m_showToolTipTimer(0), m_contentRetrievalTimer(0), + m_transientParent(0), m_fileMetaDataToolTip(0), + m_tooltipWidget(new KToolTipWidget()), m_toolTipRequested(false), m_metaDataRequested(false), m_appliedWaitCursor(false), @@ -62,11 +66,9 @@ ToolTipManager::ToolTipManager(QWidget* parent) : ToolTipManager::~ToolTipManager() { - delete m_fileMetaDataToolTip; - m_fileMetaDataToolTip = 0; } -void ToolTipManager::showToolTip(const KFileItem& item, const QRectF& itemRect) +void ToolTipManager::showToolTip(const KFileItem& item, const QRectF& itemRect, QWindow *transientParent) { hideToolTip(); @@ -75,10 +77,12 @@ void ToolTipManager::showToolTip(const KFileItem& item, const QRectF& itemRect) m_itemRect.adjust(-m_margin, -m_margin, m_margin, m_margin); m_item = item; + m_transientParent = transientParent; + // Only start the retrieving of the content, when the mouse has been over this // item for 200 milliseconds. This prevents a lot of useless preview jobs and // meta data retrieval, when passing rapidly over a lot of items. - Q_ASSERT(!m_fileMetaDataToolTip); + delete m_fileMetaDataToolTip; m_fileMetaDataToolTip = new FileMetaDataToolTip(); connect(m_fileMetaDataToolTip, &FileMetaDataToolTip::metaDataRequestFinished, this, &ToolTipManager::slotMetaDataRequestFinished); @@ -100,14 +104,7 @@ void ToolTipManager::hideToolTip() m_metaDataRequested = false; m_showToolTipTimer->stop(); m_contentRetrievalTimer->stop(); - - if (m_fileMetaDataToolTip) { - m_fileMetaDataToolTip->hide(); - // Do not delete the tool tip immediately to prevent crashes when - // QCoreApplication tries to deliver an 'Enter' event to it, see bug 310579. - m_fileMetaDataToolTip->deleteLater(); - m_fileMetaDataToolTip = 0; - } + m_tooltipWidget->hideLater(); } void ToolTipManager::startContentRetrieval() @@ -200,68 +197,9 @@ void ToolTipManager::showToolTip() return; } - const QRect screen = QApplication::desktop()->screenGeometry(QCursor::pos()); - - // Restrict tooltip size to current screen size when needed. - // Because layout controlling widget doesn't respect widget's maximumSize property - // (correct me if I'm wrong), we need to let layout do its work, then manually change - // geometry if resulting widget doesn't fit the screen. - - // Step #1 - make sizeHint return calculated tooltip size - m_fileMetaDataToolTip->layout()->setSizeConstraint(QLayout::SetFixedSize); + // Adjust the size to get a proper sizeHint() m_fileMetaDataToolTip->adjustSize(); - QSize size = m_fileMetaDataToolTip->sizeHint(); - - // Step #2 - correct tooltip size when needed - if (size.width() > screen.width()) { - size.setWidth(screen.width()); - } - if (size.height() > screen.height()) { - size.setHeight(screen.height()); - } - - // m_itemRect defines the area of the item, where the tooltip should be - // shown. Per default the tooltip is shown centered at the bottom. - // It must be assured that: - // - the content is fully visible - // - the content is not drawn inside m_itemRect - const bool hasRoomToLeft = (m_itemRect.left() - size.width() - m_margin >= screen.left()); - const bool hasRoomToRight = (m_itemRect.right() + size.width() + m_margin <= screen.right()); - const bool hasRoomAbove = (m_itemRect.top() - size.height() - m_margin >= screen.top()); - const bool hasRoomBelow = (m_itemRect.bottom() + size.height() + m_margin <= screen.bottom()); - if (!hasRoomAbove && !hasRoomBelow && !hasRoomToLeft && !hasRoomToRight) { - return; - } - - int x, y; - if (hasRoomBelow || hasRoomAbove) { - x = qMax(screen.left(), m_itemRect.center().x() - size.width() / 2); - if (x + size.width() >= screen.right()) { - x = screen.right() - size.width() + 1; - } - if (hasRoomBelow) { - y = m_itemRect.bottom() + m_margin; - } else { - y = m_itemRect.top() - size.height() - m_margin; - } - } else { - Q_ASSERT(hasRoomToLeft || hasRoomToRight); - if (hasRoomToRight) { - x = m_itemRect.right() + m_margin; - } else { - x = m_itemRect.left() - size.width() - m_margin; - } - // Put the tooltip at the bottom of the screen. The x-coordinate has already - // been adjusted, so that no overlapping with m_itemRect occurs. - y = screen.bottom() - size.height() + 1; - } - - // Step #3 - Alter tooltip geometry - m_fileMetaDataToolTip->setFixedSize(size); - m_fileMetaDataToolTip->layout()->setSizeConstraint(QLayout::SetNoConstraint); - m_fileMetaDataToolTip->move(QPoint(x, y)); - m_fileMetaDataToolTip->show(); - + m_tooltipWidget->showBelow(m_itemRect, m_fileMetaDataToolTip, m_transientParent); m_toolTipRequested = false; } diff --git a/src/views/tooltips/tooltipmanager.h b/src/views/tooltips/tooltipmanager.h index f6d8b8f26..58fe68763 100644 --- a/src/views/tooltips/tooltipmanager.h +++ b/src/views/tooltips/tooltipmanager.h @@ -26,7 +26,9 @@ #include class FileMetaDataToolTip; +class KToolTipWidget; class QTimer; +class QWindow; /** * @brief Manages the tooltips for an item view. @@ -47,9 +49,9 @@ public: * Triggers the showing of the tooltip for the item \p item * where the item has the maximum boundaries of \p itemRect. * The tooltip manager takes care that the tooltip is shown - * slightly delayed. + * slightly delayed and with a proper \p transientParent. */ - void showToolTip(const KFileItem& item, const QRectF& itemRect); + void showToolTip(const KFileItem& item, const QRectF& itemRect, QWindow *transientParent); /** * Hides the currently shown tooltip. @@ -72,7 +74,11 @@ private: /// the tooltip content like preview and meta data gets started. QTimer* m_contentRetrievalTimer; + /// Transient parent of the tooltip, mandatory on Wayland. + QWindow* m_transientParent; + FileMetaDataToolTip* m_fileMetaDataToolTip; + QScopedPointer m_tooltipWidget; bool m_toolTipRequested; bool m_metaDataRequested; -- cgit v1.3 From f785d95171173162388633d45ef559e78eed64f6 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Sun, 5 Feb 2017 23:55:37 +0100 Subject: Drop unused include This is no longer needed since commit 230fe13d1f --- src/views/tooltips/filemetadatatooltip.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/views') diff --git a/src/views/tooltips/filemetadatatooltip.cpp b/src/views/tooltips/filemetadatatooltip.cpp index 2fbba8b9c..e466ff3ed 100644 --- a/src/views/tooltips/filemetadatatooltip.cpp +++ b/src/views/tooltips/filemetadatatooltip.cpp @@ -23,8 +23,6 @@ #include #include -// For the blurred tooltip background -#include #include #include -- cgit v1.3 From 86d2aa321d54bf3ae6c95476d649634fd0ff68d5 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Mon, 6 Feb 2017 19:12:48 +0100 Subject: [KStandardItemListWidget] Update icon when palette changes We can colorize icons based on the user's palette, so clear the pixmap cache when it changes. Differential Revision: https://phabricator.kde.org/D3937 --- src/kitemviews/kstandarditemlistwidget.cpp | 3 ++- src/views/dolphinview.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/views') diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index 8740cb73f..1c89edb6e 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -852,7 +852,8 @@ void KStandardItemListWidget::hideEvent(QHideEvent* event) bool KStandardItemListWidget::event(QEvent *event) { - if (event->type() == QEvent::WindowDeactivate || event->type() == QEvent::WindowActivate) { + if (event->type() == QEvent::WindowDeactivate || event->type() == QEvent::WindowActivate + || event->type() == QEvent::PaletteChange) { m_dirtyContent = true; } diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 7d85fa240..30298d2e1 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -731,6 +732,7 @@ bool DolphinView::eventFilter(QObject* watched, QEvent* event) switch (event->type()) { case QEvent::PaletteChange: updatePalette(); + QPixmapCache::clear(); break; case QEvent::KeyPress: -- cgit v1.3 From d75b1de7bfeba76c540f6772e997aed4aacada88 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Thu, 9 Feb 2017 19:36:11 +0100 Subject: Rename FileMetaDataToolTip to DolphinFileMetaDataWidget Since commit 230fe13d1f this class is not a "tooltip" anymore, but just a simple widget. Rename it to avoid future confusion. Reviewers: emmanuelp Differential Revision: https://phabricator.kde.org/D4451 --- src/CMakeLists.txt | 2 +- src/views/tooltips/dolphinfilemetadatawidget.cpp | 158 +++++++++++++++++++++++ src/views/tooltips/dolphinfilemetadatawidget.h | 82 ++++++++++++ src/views/tooltips/filemetadatatooltip.cpp | 158 ----------------------- src/views/tooltips/filemetadatatooltip.h | 82 ------------ src/views/tooltips/tooltipmanager.cpp | 28 ++-- src/views/tooltips/tooltipmanager.h | 4 +- 7 files changed, 257 insertions(+), 257 deletions(-) create mode 100644 src/views/tooltips/dolphinfilemetadatawidget.cpp create mode 100644 src/views/tooltips/dolphinfilemetadatawidget.h delete mode 100644 src/views/tooltips/filemetadatatooltip.cpp delete mode 100644 src/views/tooltips/filemetadatatooltip.h (limited to 'src/views') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 87300d60c..ce4cec80c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -102,7 +102,7 @@ set(dolphinprivate_LIB_SRCS views/dolphinviewactionhandler.cpp views/draganddrophelper.cpp views/renamedialog.cpp - views/tooltips/filemetadatatooltip.cpp + views/tooltips/dolphinfilemetadatawidget.cpp views/tooltips/tooltipmanager.cpp views/versioncontrol/updateitemstatesthread.cpp views/versioncontrol/versioncontrolobserver.cpp diff --git a/src/views/tooltips/dolphinfilemetadatawidget.cpp b/src/views/tooltips/dolphinfilemetadatawidget.cpp new file mode 100644 index 000000000..755636c6c --- /dev/null +++ b/src/views/tooltips/dolphinfilemetadatawidget.cpp @@ -0,0 +1,158 @@ +/*************************************************************************** + * Copyright (C) 2010 by Peter Penz * + * Copyright (C) 2008 by Fredrik Höglund * + * Copyright (C) 2012 by Mark Gaiser * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#include "dolphinfilemetadatawidget.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_BALOO +#include +#else +#include +#endif + +DolphinFileMetaDataWidget::DolphinFileMetaDataWidget(QWidget* parent) : + QWidget(parent), + m_preview(0), + m_name(0), + m_fileMetaDataWidget(0) +{ + // Create widget for file preview + m_preview = new QLabel(this); + m_preview->setAlignment(Qt::AlignTop); + + // Create widget for file name + m_name = new QLabel(this); + m_name->setForegroundRole(QPalette::ToolTipText); + m_name->setTextFormat(Qt::PlainText); + m_name->setAlignment(Qt::AlignHCenter); + + QFont font = m_name->font(); + font.setBold(true); + m_name->setFont(font); + + QFontMetrics fontMetrics(font); + m_name->setMaximumWidth(fontMetrics.averageCharWidth() * 40); + + // Create widget for the meta data +#ifndef HAVE_BALOO + m_fileMetaDataWidget = new KFileMetaDataWidget(this); + connect(m_fileMetaDataWidget, &KFileMetaDataWidget::metaDataRequestFinished, + this, &DolphinFileMetaDataWidget::metaDataRequestFinished); +#else + m_fileMetaDataWidget = new Baloo::FileMetaDataWidget(this); + connect(m_fileMetaDataWidget, &Baloo::FileMetaDataWidget::metaDataRequestFinished, + this, &DolphinFileMetaDataWidget::metaDataRequestFinished); +#endif + m_fileMetaDataWidget->setForegroundRole(QPalette::ToolTipText); + m_fileMetaDataWidget->setReadOnly(true); + + QVBoxLayout* textLayout = new QVBoxLayout(); + textLayout->addWidget(m_name); + textLayout->addWidget(new KSeparator()); + textLayout->addWidget(m_fileMetaDataWidget); + textLayout->setAlignment(m_name, Qt::AlignCenter); + textLayout->setAlignment(m_fileMetaDataWidget, Qt::AlignLeft); + // Assure that the text-layout gets top-aligned by adding a stretch. + // Don't use textLayout->setAlignment(Qt::AlignTop) instead, as this does + // not work with the heightForWidth()-size-hint of m_fileMetaDataWidget + // (see bug #241608) + textLayout->addStretch(); + + QHBoxLayout* layout = new QHBoxLayout(this); + layout->addWidget(m_preview); + layout->addSpacing(layout->margin()); + layout->addLayout(textLayout); +} + +DolphinFileMetaDataWidget::~DolphinFileMetaDataWidget() +{ +} + +void DolphinFileMetaDataWidget::setPreview(const QPixmap& pixmap) +{ + m_preview->setPixmap(pixmap); +} + +QPixmap DolphinFileMetaDataWidget::preview() const +{ + if (m_preview->pixmap()) { + return *m_preview->pixmap(); + } + return QPixmap(); +} + +void DolphinFileMetaDataWidget::setName(const QString& name) +{ + QTextOption textOption; + textOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); + + const QString processedName = Qt::mightBeRichText(name) ? name : KStringHandler::preProcessWrap(name); + + QTextLayout textLayout(processedName); + textLayout.setFont(m_name->font()); + textLayout.setTextOption(textOption); + + QString wrappedText; + wrappedText.reserve(processedName.length()); + + // wrap the text to fit into the maximum width of m_name + textLayout.beginLayout(); + QTextLine line = textLayout.createLine(); + while (line.isValid()) { + line.setLineWidth(m_name->maximumWidth()); + wrappedText += processedName.midRef(line.textStart(), line.textLength()); + + line = textLayout.createLine(); + if (line.isValid()) { + wrappedText += QChar::LineSeparator; + } + } + textLayout.endLayout(); + + m_name->setText(wrappedText); +} + +QString DolphinFileMetaDataWidget::name() const +{ + return m_name->text(); +} + +void DolphinFileMetaDataWidget::setItems(const KFileItemList& items) +{ + m_fileMetaDataWidget->setItems(items); +} + +KFileItemList DolphinFileMetaDataWidget::items() const +{ + return m_fileMetaDataWidget->items(); +} + diff --git a/src/views/tooltips/dolphinfilemetadatawidget.h b/src/views/tooltips/dolphinfilemetadatawidget.h new file mode 100644 index 000000000..cf796250d --- /dev/null +++ b/src/views/tooltips/dolphinfilemetadatawidget.h @@ -0,0 +1,82 @@ +/*************************************************************************** + * Copyright (C) 2010 by Peter Penz * + * Copyright (C) 2008 by Fredrik Höglund * + * Copyright (C) 2012 by Mark Gaiser * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef DOLPHINFILEMETADATAWIDGET_H +#define DOLPHINFILEMETADATAWIDGET_H + +#include +#include "config-baloo.h" + +class KFileItemList; +class QLabel; + +#ifndef HAVE_BALOO +class KFileMetaDataWidget; +#else +namespace Baloo { + class FileMetaDataWidget; +} +#endif + +/** + * @brief Widget that shows the meta information and a preview of one + * or more files inside a KToolTipWidget. + */ +class DolphinFileMetaDataWidget : public QWidget +{ + Q_OBJECT + +public: + DolphinFileMetaDataWidget(QWidget* parent = 0); + virtual ~DolphinFileMetaDataWidget(); + + void setPreview(const QPixmap& pixmap); + QPixmap preview() const; + + void setName(const QString& name); + QString name() const; + + /** + * Sets the items for which the meta data should be shown. + * The signal metaDataRequestFinished() will be emitted, + * as soon as the meta data for the items has been received. + */ + void setItems(const KFileItemList& items); + KFileItemList items() const; + +signals: + /** + * Is emitted after the meta data has been received for the items + * set by DolphinFileMetaDataWidget::setItems(). + */ + void metaDataRequestFinished(const KFileItemList& items); + +private: + QLabel* m_preview; + QLabel* m_name; +#ifndef HAVE_BALOO + KFileMetaDataWidget* m_fileMetaDataWidget; +#else + Baloo::FileMetaDataWidget* m_fileMetaDataWidget; +#endif +}; + +#endif diff --git a/src/views/tooltips/filemetadatatooltip.cpp b/src/views/tooltips/filemetadatatooltip.cpp deleted file mode 100644 index e466ff3ed..000000000 --- a/src/views/tooltips/filemetadatatooltip.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 by Peter Penz * - * Copyright (C) 2008 by Fredrik Höglund * - * Copyright (C) 2012 by Mark Gaiser * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - -#include "filemetadatatooltip.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#ifndef HAVE_BALOO -#include -#else -#include -#endif - -FileMetaDataToolTip::FileMetaDataToolTip(QWidget* parent) : - QWidget(parent), - m_preview(0), - m_name(0), - m_fileMetaDataWidget(0) -{ - // Create widget for file preview - m_preview = new QLabel(this); - m_preview->setAlignment(Qt::AlignTop); - - // Create widget for file name - m_name = new QLabel(this); - m_name->setForegroundRole(QPalette::ToolTipText); - m_name->setTextFormat(Qt::PlainText); - m_name->setAlignment(Qt::AlignHCenter); - - QFont font = m_name->font(); - font.setBold(true); - m_name->setFont(font); - - QFontMetrics fontMetrics(font); - m_name->setMaximumWidth(fontMetrics.averageCharWidth() * 40); - - // Create widget for the meta data -#ifndef HAVE_BALOO - m_fileMetaDataWidget = new KFileMetaDataWidget(this); - connect(m_fileMetaDataWidget, &KFileMetaDataWidget::metaDataRequestFinished, - this, &FileMetaDataToolTip::metaDataRequestFinished); -#else - m_fileMetaDataWidget = new Baloo::FileMetaDataWidget(this); - connect(m_fileMetaDataWidget, &Baloo::FileMetaDataWidget::metaDataRequestFinished, - this, &FileMetaDataToolTip::metaDataRequestFinished); -#endif - m_fileMetaDataWidget->setForegroundRole(QPalette::ToolTipText); - m_fileMetaDataWidget->setReadOnly(true); - - QVBoxLayout* textLayout = new QVBoxLayout(); - textLayout->addWidget(m_name); - textLayout->addWidget(new KSeparator()); - textLayout->addWidget(m_fileMetaDataWidget); - textLayout->setAlignment(m_name, Qt::AlignCenter); - textLayout->setAlignment(m_fileMetaDataWidget, Qt::AlignLeft); - // Assure that the text-layout gets top-aligned by adding a stretch. - // Don't use textLayout->setAlignment(Qt::AlignTop) instead, as this does - // not work with the heightForWidth()-size-hint of m_fileMetaDataWidget - // (see bug #241608) - textLayout->addStretch(); - - QHBoxLayout* tipLayout = new QHBoxLayout(this); - tipLayout->addWidget(m_preview); - tipLayout->addSpacing(tipLayout->margin()); - tipLayout->addLayout(textLayout); -} - -FileMetaDataToolTip::~FileMetaDataToolTip() -{ -} - -void FileMetaDataToolTip::setPreview(const QPixmap& pixmap) -{ - m_preview->setPixmap(pixmap); -} - -QPixmap FileMetaDataToolTip::preview() const -{ - if (m_preview->pixmap()) { - return *m_preview->pixmap(); - } - return QPixmap(); -} - -void FileMetaDataToolTip::setName(const QString& name) -{ - QTextOption textOption; - textOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); - - const QString processedName = Qt::mightBeRichText(name) ? name : KStringHandler::preProcessWrap(name); - - QTextLayout textLayout(processedName); - textLayout.setFont(m_name->font()); - textLayout.setTextOption(textOption); - - QString wrappedText; - wrappedText.reserve(processedName.length()); - - // wrap the text to fit into the maximum width of m_name - textLayout.beginLayout(); - QTextLine line = textLayout.createLine(); - while (line.isValid()) { - line.setLineWidth(m_name->maximumWidth()); - wrappedText += processedName.midRef(line.textStart(), line.textLength()); - - line = textLayout.createLine(); - if (line.isValid()) { - wrappedText += QChar::LineSeparator; - } - } - textLayout.endLayout(); - - m_name->setText(wrappedText); -} - -QString FileMetaDataToolTip::name() const -{ - return m_name->text(); -} - -void FileMetaDataToolTip::setItems(const KFileItemList& items) -{ - m_fileMetaDataWidget->setItems(items); -} - -KFileItemList FileMetaDataToolTip::items() const -{ - return m_fileMetaDataWidget->items(); -} - diff --git a/src/views/tooltips/filemetadatatooltip.h b/src/views/tooltips/filemetadatatooltip.h deleted file mode 100644 index 1738e386c..000000000 --- a/src/views/tooltips/filemetadatatooltip.h +++ /dev/null @@ -1,82 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2010 by Peter Penz * - * Copyright (C) 2008 by Fredrik Höglund * - * Copyright (C) 2012 by Mark Gaiser * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - -#ifndef FILEMETADATATOOLTIP_H -#define FILEMETADATATOOLTIP_H - -#include -#include "config-baloo.h" - -class KFileItemList; -class QLabel; - -#ifndef HAVE_BALOO -class KFileMetaDataWidget; -#else -namespace Baloo { - class FileMetaDataWidget; -} -#endif - -/** - * @brief Widget that shows the meta information and a preview of one - * or more files inside a KToolTipWidget. - */ -class FileMetaDataToolTip : public QWidget -{ - Q_OBJECT - -public: - FileMetaDataToolTip(QWidget* parent = 0); - virtual ~FileMetaDataToolTip(); - - void setPreview(const QPixmap& pixmap); - QPixmap preview() const; - - void setName(const QString& name); - QString name() const; - - /** - * Sets the items for which the meta data should be shown. - * The signal metaDataRequestFinished() will be emitted, - * as soon as the meta data for the items has been received. - */ - void setItems(const KFileItemList& items); - KFileItemList items() const; - -signals: - /** - * Is emitted after the meta data has been received for the items - * set by FileMetaDataToolTip::setItems(). - */ - void metaDataRequestFinished(const KFileItemList& items); - -private: - QLabel* m_preview; - QLabel* m_name; -#ifndef HAVE_BALOO - KFileMetaDataWidget* m_fileMetaDataWidget; -#else - Baloo::FileMetaDataWidget* m_fileMetaDataWidget; -#endif -}; - -#endif diff --git a/src/views/tooltips/tooltipmanager.cpp b/src/views/tooltips/tooltipmanager.cpp index d19e98c81..4a9f91359 100644 --- a/src/views/tooltips/tooltipmanager.cpp +++ b/src/views/tooltips/tooltipmanager.cpp @@ -19,7 +19,7 @@ #include "tooltipmanager.h" -#include "filemetadatatooltip.h" +#include "dolphinfilemetadatawidget.h" #include #include #include @@ -38,7 +38,7 @@ ToolTipManager::ToolTipManager(QWidget* parent) : m_showToolTipTimer(0), m_contentRetrievalTimer(0), m_transientParent(0), - m_fileMetaDataToolTip(0), + m_fileMetaDataWidget(0), m_tooltipWidget(new KToolTipWidget()), m_toolTipRequested(false), m_metaDataRequested(false), @@ -82,9 +82,9 @@ void ToolTipManager::showToolTip(const KFileItem& item, const QRectF& itemRect, // Only start the retrieving of the content, when the mouse has been over this // item for 200 milliseconds. This prevents a lot of useless preview jobs and // meta data retrieval, when passing rapidly over a lot of items. - delete m_fileMetaDataToolTip; - m_fileMetaDataToolTip = new FileMetaDataToolTip(); - connect(m_fileMetaDataToolTip, &FileMetaDataToolTip::metaDataRequestFinished, + delete m_fileMetaDataWidget; + m_fileMetaDataWidget = new DolphinFileMetaDataWidget(); + connect(m_fileMetaDataWidget, &DolphinFileMetaDataWidget::metaDataRequestFinished, this, &ToolTipManager::slotMetaDataRequestFinished); m_contentRetrievalTimer->start(); @@ -113,17 +113,17 @@ void ToolTipManager::startContentRetrieval() return; } - m_fileMetaDataToolTip->setName(m_item.text()); + m_fileMetaDataWidget->setName(m_item.text()); // Request the retrieval of meta-data. The slot // slotMetaDataRequestFinished() is invoked after the // meta-data have been received. m_metaDataRequested = true; - m_fileMetaDataToolTip->setItems(KFileItemList() << m_item); - m_fileMetaDataToolTip->adjustSize(); + m_fileMetaDataWidget->setItems(KFileItemList() << m_item); + m_fileMetaDataWidget->adjustSize(); // Request a preview of the item - m_fileMetaDataToolTip->setPreview(QPixmap()); + m_fileMetaDataWidget->setPreview(QPixmap()); KIO::PreviewJob* job = new KIO::PreviewJob(KFileItemList() << m_item, QSize(256, 256)); job->setIgnoreMaximumSize(m_item.isLocalFile()); @@ -149,7 +149,7 @@ void ToolTipManager::setPreviewPix(const KFileItem& item, if (pixmap.isNull()) { previewFailed(); } else { - m_fileMetaDataToolTip->setPreview(pixmap); + m_fileMetaDataWidget->setPreview(pixmap); if (!m_showToolTipTimer->isActive()) { showToolTip(); } @@ -163,7 +163,7 @@ void ToolTipManager::previewFailed() } const QPixmap pixmap = QIcon::fromTheme(m_item.iconName()).pixmap(128, 128); - m_fileMetaDataToolTip->setPreview(pixmap); + m_fileMetaDataWidget->setPreview(pixmap); if (!m_showToolTipTimer->isActive()) { showToolTip(); } @@ -190,7 +190,7 @@ void ToolTipManager::showToolTip() m_appliedWaitCursor = false; } - if (m_fileMetaDataToolTip->preview().isNull() || m_metaDataRequested) { + if (m_fileMetaDataWidget->preview().isNull() || m_metaDataRequested) { Q_ASSERT(!m_appliedWaitCursor); QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); m_appliedWaitCursor = true; @@ -198,8 +198,8 @@ void ToolTipManager::showToolTip() } // Adjust the size to get a proper sizeHint() - m_fileMetaDataToolTip->adjustSize(); - m_tooltipWidget->showBelow(m_itemRect, m_fileMetaDataToolTip, m_transientParent); + m_fileMetaDataWidget->adjustSize(); + m_tooltipWidget->showBelow(m_itemRect, m_fileMetaDataWidget, m_transientParent); m_toolTipRequested = false; } diff --git a/src/views/tooltips/tooltipmanager.h b/src/views/tooltips/tooltipmanager.h index 58fe68763..9c504c898 100644 --- a/src/views/tooltips/tooltipmanager.h +++ b/src/views/tooltips/tooltipmanager.h @@ -25,7 +25,7 @@ #include -class FileMetaDataToolTip; +class DolphinFileMetaDataWidget; class KToolTipWidget; class QTimer; class QWindow; @@ -77,7 +77,7 @@ private: /// Transient parent of the tooltip, mandatory on Wayland. QWindow* m_transientParent; - FileMetaDataToolTip* m_fileMetaDataToolTip; + DolphinFileMetaDataWidget* m_fileMetaDataWidget; QScopedPointer m_tooltipWidget; bool m_toolTipRequested; -- cgit v1.3