From: Flavio Tordini Date: Thu, 22 Apr 2010 21:12:00 +0000 (+0200) Subject: Fix compilation on Windows X-Git-Tag: 1.0~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6464234221aae8f22c6a5e15cb82d553428b3737;p=minitube Fix compilation on Windows --- diff --git a/src/main.cpp b/src/main.cpp index 1c2b0be..a0b87be 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,7 +25,11 @@ int main(int argc, char **argv) { app.installTranslator(&qtTranslator); // app translations +#ifdef PKGDATADIR QString dataDir = QLatin1String(PKGDATADIR); +#else + QString dataDir = ""; +#endif QString localeDir = dataDir + QDir::separator() + "locale"; // if app was not "installed" use the app directory if (!QFile::exists(localeDir)) { @@ -40,6 +44,7 @@ int main(int argc, char **argv) { MainWindow mainWin; mainWin.setWindowTitle(Constants::APP_NAME); +// no window icon on Mac #ifndef Q_WS_MAC if (!QFile::exists(dataDir)) { dataDir = qApp->applicationDirPath() + "/data"; @@ -51,7 +56,6 @@ int main(int argc, char **argv) { QString png = dataDir + "/" + size + "x" + size + "/minitube.png"; // qDebug() << png; appIcon.addFile(png, QSize(iconSizes[i], iconSizes[i])); - // appIcon.addPixmap(QPixmap(png)); } mainWin.setWindowIcon(appIcon); #endif