[KDE/Mac] Thoughts on standard directories in Qt5 - QStandardPaths
Ian Wadham
iandw.au at gmail.com
Tue Dec 9 05:08:03 UTC 2014
Hi Marko,
On 07/12/2014, at 2:16 PM, Ian Wadham wrote:
> There is a KF5 porting bug in Bovo. The source file gui/theme.cc contains
> an unported reference to KStandardDirs() (KDE 4's way to find paths):
> themePath = KStandardDirs::locate("appdata", themePath);
>
> I don't know for sure why this would have worked in Linux's KF5, but maybe
> something to do with the kde4support temporary library.
Try the following patch, in the Bovo repository:
diff --git a/gui/theme.cc b/gui/theme.cc
index 99d8a25..ee0c0de 100644
--- a/gui/
+++ b/gui/theme.cc theme.cc
@@ -22,11 +22,12 @@
// Selc include
#include "theme.h"
+#include <QStandardPaths>
+
// KDE includes
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kdesktopfile.h>
-#include <kstandarddirs.h>
// KConfig XT includes
#include "settings.h"
@@ -39,7 +40,7 @@ Theme::Theme() {
Theme::Theme(const QString& path, const int id)
: m_id(id), m_path(path) {
QString themePath = QString("themes/%1/").arg(m_path);
- themePath = KStandardDirs::locate("appdata", themePath);
+ themePath = QStandardPaths::locate(QStandardPaths::DataLocation, themePath);
QString themerc = themePath + "themerc";
KDesktopFile themeConfig(themerc);
m_name = themeConfig.readName();
Let me know if it works. If it does, I will post to the KDE Games list.
Cheers, Ian W.
More information about the kde-mac
mailing list