From 6464234221aae8f22c6a5e15cb82d553428b3737 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Thu, 22 Apr 2010 23:12:00 +0200 Subject: [PATCH] Fix compilation on Windows --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.5