[sailfish] closes #107
This commit is contained in:
parent
fd699938b5
commit
2b356bf4c3
2 changed files with 23 additions and 3 deletions
|
|
@ -17,12 +17,13 @@
|
|||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see
|
||||
# http://www.gnu.org/licenses/.
|
||||
|
||||
VERSION = 0.4.4
|
||||
VERSION = 0.4.5
|
||||
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
||||
|
||||
DEFINES += Q_OS_SAILFISH
|
||||
|
||||
TARGET = harbour-ttrss-cnlpete
|
||||
DEFINES += TARGET=\\\"$$TARGET\\\"
|
||||
|
||||
##CONFIG += sailfishapp
|
||||
|
||||
|
|
|
|||
23
main.cpp
23
main.cpp
|
|
@ -37,6 +37,8 @@
|
|||
|
||||
#include <QTranslator>
|
||||
#include <QLocale>
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
|
||||
#include "settings.hh"
|
||||
#include "qmlutils.hh"
|
||||
|
|
@ -56,8 +58,25 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
|||
#endif
|
||||
|
||||
app->setApplicationVersion(APP_VERSION);
|
||||
app->setApplicationName("ttrss");
|
||||
app->setOrganizationName("Hauke Schade");
|
||||
app->setApplicationName(TARGET);
|
||||
//app->setOrganizationName("Hauke Schade");
|
||||
|
||||
#if defined(Q_OS_SAILFISH)
|
||||
// check for the old settings file, try to move it to new location
|
||||
QFileInfo settingsfileInfo(".config/Hauke Schade/ttrss.conf");
|
||||
QFile settingsfile(settingsfileInfo.absoluteFilePath());
|
||||
if (settingsfile.exists()) {
|
||||
if (!QDir(".config/" + QString(TARGET)).exists())
|
||||
QDir(".config/").mkdir(TARGET);
|
||||
QFileInfo newSettingsfileInfo(".config/" + QString(TARGET) + "/" + QString(TARGET) + ".conf");
|
||||
QFile newSettingsfile(newSettingsfileInfo.absoluteFilePath());
|
||||
if (newSettingsfile.exists())
|
||||
settingsfile.rename(".config/" + QString(TARGET) + "/" + QString(TARGET) + ".old.conf");
|
||||
else
|
||||
settingsfile.rename(".config/" + QString(TARGET) + "/" + QString(TARGET) + ".conf");
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
|
||||
QString locale = QLocale::system().name();
|
||||
qDebug() << "detected locale is " << locale;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue