Commit f40df0e6 authored by Roman Gilg's avatar Roman Gilg
Browse files

refactor: make Globals a namespace

Summary: Globals does not need to be a class. This simplifies working with it.

Test Plan: Compiles.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent e5abdd26
......@@ -18,16 +18,22 @@ along with this program. If not, see <>.
#include <QStandardPaths>
QString Globals::s_dirPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) % QStringLiteral("/kscreen/");
namespace Globals
QString s_dirPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) %
QString Globals::dirPath() {
QString dirPath() {
return s_dirPath;
void Globals::setDirPath(const QString &path)
void setDirPath(const QString &path)
s_dirPath = path;
if (!s_dirPath.endsWith(QLatin1Char('/'))) {
s_dirPath += QLatin1Char('/');
......@@ -19,14 +19,10 @@ along with this program. If not, see <>.
#include <QString>
class Globals
namespace Globals
static void setDirPath(const QString &path);
static QString dirPath();
static QString s_dirPath;
void setDirPath(const QString &path);
QString dirPath();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment