Set the application name
This commit is contained in:
parent
00b363c0b0
commit
ae3c9fb55d
1 changed files with 6 additions and 2 deletions
|
@ -27,6 +27,8 @@ int main(int argc, char *argv[])
|
|||
QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));
|
||||
QScopedPointer<QQuickView> view(SailfishApp::createView());
|
||||
|
||||
QCoreApplication::setApplicationName(QStringLiteral("Papocchio"));
|
||||
|
||||
// Otherwise the Canvas is cleaned when the application is not
|
||||
// marked as active. See for more:
|
||||
// https://lists.sailfishos.org/pipermail/devel/2014-October/005065.html
|
||||
|
@ -49,10 +51,12 @@ int main(int argc, char *argv[])
|
|||
QString papocchioDir()
|
||||
{
|
||||
const QDir papocchioDir(QStandardPaths::writableLocation(QStandardPaths::PicturesLocation)
|
||||
+ QDir::separator() + "Papocchio");
|
||||
+ QDir::separator() + QCoreApplication::applicationName());
|
||||
|
||||
if (!papocchioDir.exists()) {
|
||||
papocchioDir.mkpath(papocchioDir.absolutePath());
|
||||
if (!papocchioDir.mkpath(papocchioDir.absolutePath())) {
|
||||
qCritical() << "Cannot create dir!";
|
||||
}
|
||||
}
|
||||
|
||||
return QString(papocchioDir.absolutePath() + QDir::separator());
|
||||
|
|
Loading…
Reference in a new issue