Set application icons for X11 based systems

This commit is contained in:
Felix Kauselmann
2018-01-03 20:20:51 +01:00
parent 8f886661c6
commit 184cd43257
2 changed files with 17 additions and 11 deletions

View File

@ -86,6 +86,9 @@ int main(int argc, char * argv[])
app.setApplicationName("YACReader"); app.setApplicationName("YACReader");
app.setOrganizationName("YACReader"); app.setOrganizationName("YACReader");
app.setAttribute(Qt::AA_UseHighDpiPixmaps); app.setAttribute(Qt::AA_UseHighDpiPixmaps);
if (QIcon::hasThemeIcon("YACReader")) {
app.setWindowIcon(QIcon::fromTheme("YACReader"));
}
//simple command line parser //simple command line parser
//will be replaced by QCommandLineParser in the future //will be replaced by QCommandLineParser in the future
QStringList optlist; QStringList optlist;

View File

@ -158,6 +158,9 @@ int main( int argc, char ** argv )
app.setApplicationVersion(VERSION); app.setApplicationVersion(VERSION);
app.setAttribute(Qt::AA_UseHighDpiPixmaps); app.setAttribute(Qt::AA_UseHighDpiPixmaps);
if (QIcon::hasThemeIcon("YACReaderLibrary")) {
app.setWindowIcon(QIcon::fromTheme("YACReaderLibrary"));
}
QString destLog = YACReader::getSettingsPath()+"/yacreaderlibrary.log"; QString destLog = YACReader::getSettingsPath()+"/yacreaderlibrary.log";
QDir().mkpath(YACReader::getSettingsPath()); QDir().mkpath(YACReader::getSettingsPath());