From d60bc4dc6cfea1c6a6cbc8b6cd850852102da5fd Mon Sep 17 00:00:00 2001 From: Gambhiro Date: Tue, 1 Dec 2015 17:33:27 +0000 Subject: [PATCH] hard-code /usr/share/fractorium for now --- Source/Fractorium/FractoriumEmberController.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Fractorium/FractoriumEmberController.cpp b/Source/Fractorium/FractoriumEmberController.cpp index 3e4d5b3..2f3a796 100644 --- a/Source/Fractorium/FractoriumEmberController.cpp +++ b/Source/Fractorium/FractoriumEmberController.cpp @@ -77,7 +77,14 @@ FractoriumEmberController::FractoriumEmberController(Fractorium* fractorium) m_PreviewRenderer = unique_ptr>(new EmberNs::Renderer()); //Initial combo change event to fill the palette table will be called automatically later. - if (!InitPaletteList(QCoreApplication::applicationDirPath().toLocal8Bit().data())) + + // TODO: Use QStandardPaths::DataLocation(), on linux one of the paths it + // returns should be "/usr/share/fractorium". It might have to be lowercased + // to make sure. + // + // http://doc.qt.io/qt-5/qstandardpaths.html#StandardLocation-enum + + if (!InitPaletteList(QString("/usr/share/fractorium").toLocal8Bit().data())) throw "No palettes found, exiting."; BackgroundChanged(QColor(0, 0, 0));//Default to black.