Skip to content

Commit

Permalink
Fixed expanding home path for config
Browse files Browse the repository at this point in the history
  • Loading branch information
vishesh committed Feb 23, 2012
1 parent aec2c25 commit 913a1f0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.cpp
Expand Up @@ -8,6 +8,7 @@
#include <iostream>

#include <QtCore/QFileInfo>
#include <QtCore/QDir>
#include <QtDBus/QtDBus>
#include <QCoreApplication>

Expand All @@ -16,6 +17,7 @@
#include <KConfigGroup>
#include <KGlobalSettings>
#include <KStandardDirs>
#include <KUrl>

QMap<QString, QString> availableColorSchemes();
void applyColorScheme(const QString &path);
Expand Down Expand Up @@ -132,8 +134,10 @@ void applyColorScheme(const QString &path)

void toggleColorScheme()
{
QFileInfo fi("~/.kcss-profilerc");
KSharedConfigPtr profileConfig = KSharedConfig::openConfig(fi.absoluteFilePath());
KUrl cfp(QDir::homePath());
cfp.addPath(".kcss-profilerc");

KSharedConfigPtr profileConfig = KSharedConfig::openConfig(cfp.path());
KConfigGroup dark(profileConfig, "Dark");
KConfigGroup light(profileConfig, "Light");
KConfigGroup def(profileConfig, "Default");
Expand Down

0 comments on commit 913a1f0

Please sign in to comment.