Skip to content

Commit

Permalink
Use canst QString instead of #define
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianTM committed Jun 11, 2023
1 parent 5eef78f commit 807c0d0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// display doc as nomal user when run as root
void displayDoc(const QString &url, const QString &title)
{
bool started_as_root = false;
// prefer mx-viewer otherwise use xdg-open (use runuser to run that as logname user)
if (QFile::exists(QStringLiteral("/usr/bin/mx-viewer"))) {
QProcess::startDetached(QStringLiteral("mx-viewer"), {url, title});
Expand All @@ -30,8 +29,6 @@ void displayDoc(const QString &url, const QString &title)
QStringLiteral("xdg-open"), url});
}
}
if (started_as_root)
qputenv("HOME", "/root");
}

void displayAboutMsgBox(const QString &title, const QString &message, const QString &licence_url,
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ override_dh_auto_clean:

override_dh_auto_build:
lrelease mx-select-sound.pro
head -n1 debian/changelog | sed -e "s/.*(\([^(]*\)).*/#define VERSION \"\1\"/" > version.h
head -n1 debian/changelog | sed -e "s/.*(\([^(]*\)).*/const QString VERSION {\"\1\"};/" > version.h
dh_auto_build -- $(MAKE_OPTS)

override_dh_auto_install:
Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define VERSION "19.9"
const QString VERSION {"23.5"};

0 comments on commit 807c0d0

Please sign in to comment.