Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Building plasma-desktop/applets/taskmanager by itself
# Download
git clone git://anongit.kde.org/plasma-desktop
cd plasma-desktop
# Apply patch
git apply 1-taskmanager-cmakelist.diff
cd applets/taskmanager
# Build
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=OFF -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
make
sudo make install
cd ..
# Debugging
git apply 2-Debugging-Bug401579.diff
( cd build \
&& cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=OFF -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
&& make \
&& sudo make install \
)
diff --git a/applets/taskmanager/CMakeLists.txt b/applets/taskmanager/CMakeLists.txt
index 63f779fd..46d50361 100644
--- a/applets/taskmanager/CMakeLists.txt
+++ b/applets/taskmanager/CMakeLists.txt
@@ -1,3 +1,39 @@
+cmake_minimum_required(VERSION 3.0)
+
+project(plasma-desktop)
+
+set(PROJECT_VERSION "5.14.80")
+set(PROJECT_VERSION_MAJOR 5)
+
+set(QT_MIN_VERSION "5.11.0")
+set(KF5_MIN_VERSION "5.50.0")
+
+find_package(ECM ${ECM_MIN_VERSION} REQUIRED NO_MODULE)
+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_MODULE_PATH})
+
+include(KDEInstallDirs)
+include(KDECMakeSettings)
+include(KDECompilerSettings NO_POLICY_SCOPE)
+
+find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS
+ Core
+ Gui
+ DBus
+ Widgets
+ Quick
+)
+find_package(KF5 REQUIRED COMPONENTS
+ CoreAddons
+ Declarative
+ DocTools
+ GlobalAccel
+ I18n
+ Plasma
+ KIO
+ Activities
+ ActivitiesStats
+)
+
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.taskmanager\")
plasma_install_package(package org.kde.plasma.taskmanager)
diff --git a/applets/taskmanager/plugin/backend.cpp b/applets/taskmanager/plugin/backend.cpp
index 3bdfbeb4..416cb931 100644
--- a/applets/taskmanager/plugin/backend.cpp
+++ b/applets/taskmanager/plugin/backend.cpp
@@ -319,7 +319,7 @@ QVariantList Backend::recentDocumentActions(const QUrl &launcherUrl, QObject *pa
while (actionCount < 5 && resultIt != results.end()) {
const QString resource = (*resultIt).resource();
- const QUrl url(resource);
+ QUrl url(resource);
if (!url.isValid()) {
continue;
@@ -331,8 +331,18 @@ QVariantList Backend::recentDocumentActions(const QUrl &launcherUrl, QObject *pa
continue;
}
+ if (url.scheme() == QStringLiteral("")) {
+ url.setScheme("file");
+ }
+
QAction *action = new QAction(parent);
action->setText(url.fileName());
+ qDebug() << "url:" << url;
+ qDebug() << " scheme:" << url.scheme();
+ qDebug() << " isLocal:" << url.isLocalFile();
+ qDebug() << " isDir:" << fileItem.isDir();
+ qDebug() << " icon:" << fileItem.iconName();
+
action->setIcon(QIcon::fromTheme(fileItem.iconName(), QIcon::fromTheme(QStringLiteral("unknown"))));
action->setProperty("agent", storageId);
action->setProperty("entryPath", desktopEntryUrl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.