Skip to content

Commit

Permalink
[ER] Use QStandardPaths::GenericDataLocation to locate konsole files
Browse files Browse the repository at this point in the history
  • Loading branch information
0xd34df00d committed Nov 4, 2018
1 parent 24c8aa3 commit 32bf447
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/plugins/eleeminator/colorschemesmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <QDir>
#include <QSettings>
#include <QSet>
#include <QStandardPaths>
#include <qtermwidget.h>
#include <util/sll/prelude.h>

Expand Down Expand Up @@ -80,13 +81,8 @@ namespace Eleeminator

void ColorSchemesManager::LoadKonsoleSchemes ()
{
const QStringList pathCandidates
{
"/usr/share/apps/konsole/",
"/usr/local/share/apps/konsole/",
"/usr/share/konsole/",
"/usr/local/share/konsole/"
};
const auto& pathCandidates = Util::Map (QStandardPaths::standardLocations (QStandardPaths::GenericDataLocation),
[] (const QString& str) { return str + "/konsole/"; });

const auto& filenames = Util::ConcatMap (pathCandidates, &CollectSchemes);
Schemes_ += Util::Map (Util::Filter (Util::Map (filenames, &ParseScheme),
Expand Down

0 comments on commit 32bf447

Please sign in to comment.