diff --git a/src/frmabout.cpp b/src/frmabout.cpp index d77774b8..fbf6ab48 100644 --- a/src/frmabout.cpp +++ b/src/frmabout.cpp @@ -12,8 +12,11 @@ frmAbout::frmAbout(QWidget *parent) : ui->setupUi(this); ui->lblAbout->setText(ui->lblAbout->text().arg(qApp->applicationVersion())); - +#ifdef UNIX + QFile file("/usr/share/doc/" + qApp->applicationDisplayName() + "/LICENSE"); +#else QFile file(qApp->applicationDirPath() + "/LICENSE"); +#endif if (file.open(QIODevice::ReadOnly)) { ui->txtLicense->setPlainText(file.readAll()); diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 5c3b4590..3834d2b7 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -30,6 +30,8 @@ #include #include #include +#include + #include "frmmain.h" #include "ui_frmmain.h" @@ -43,7 +45,11 @@ frmMain::frmMain(QWidget *parent) : m_statusForeColors << "white" << "palette(text)" << "white" << "black" << "black" << "black" << "black" << "palette(text)" << "white"; // Loading settings +#ifdef UNIX + m_settingsFileName = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)+ "/candle/" + "/settings.ini"; +#else m_settingsFileName = qApp->applicationDirPath() + "/settings.ini"; +#endif preloadSettings(); m_settings = new frmSettings(this); diff --git a/src/main.cpp b/src/main.cpp index aeed2e05..6e1e21ab 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -44,7 +44,11 @@ int main(int argc, char *argv[]) // QLocale::setDefault(QLocale("es")); QString loc = QLocale().name().left(2); +#ifdef UNIX + QString translationsFolder = "/usr/share/" + qApp->applicationDisplayName() + "/translations/"; +#else QString translationsFolder = qApp->applicationDirPath() + "/translations/"; +#endif QString translationFileName = translationsFolder + qApp->applicationDisplayName() + "_" + loc + ".qm"; qDebug() << "locale:" << loc;