main.cpp   main.cpp 
skipping to change at line 112 skipping to change at line 112
} }
//! Removes all items from the cache. //! Removes all items from the cache.
void clearCache() void clearCache()
{ {
QNetworkDiskCache* cacheMgr = new QNetworkDiskCache(); QNetworkDiskCache* cacheMgr = new QNetworkDiskCache();
cacheMgr->setCacheDirectory(StelFileMgr::getCacheDir()); cacheMgr->setCacheDirectory(StelFileMgr::getCacheDir());
cacheMgr->clear(); // Removes all items from the cache. cacheMgr->clear(); // Removes all items from the cache.
} }
void registerPluginsDir(QDir& appDir)
{
QStringList pathes;
// Windows
pathes << appDir.absolutePath();
pathes << appDir.absoluteFilePath("platforms");
// OS X
appDir.cdUp();
pathes << appDir.absoluteFilePath("plugins");
// All systems
pathes << QCoreApplication::libraryPaths();
QCoreApplication::setLibraryPaths(pathes);
}
// Main stellarium procedure // Main stellarium procedure
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
// Fix for the speeding system clock bug on systems that use ACPI // Fix for the speeding system clock bug on systems that use ACPI
// See http://support.microsoft.com/kb/821893 // See http://support.microsoft.com/kb/821893
UINT timerGrain = 1; UINT timerGrain = 1;
if (timeBeginPeriod(timerGrain) == TIMERR_NOCANDO) if (timeBeginPeriod(timerGrain) == TIMERR_NOCANDO)
{ {
// If this is too fine a grain, try the lowest value used by a timer // If this is too fine a grain, try the lowest value used by a timer
skipping to change at line 147 skipping to change at line 133
if (timeBeginPeriod(timerGrain) == TIMERR_NOCANDO) if (timeBeginPeriod(timerGrain) == TIMERR_NOCANDO)
timerGrain = 0; timerGrain = 0;
} }
#endif #endif
QCoreApplication::setApplicationName("stellarium"); QCoreApplication::setApplicationName("stellarium");
QCoreApplication::setApplicationVersion(StelUtils::getApplicationVer sion()); QCoreApplication::setApplicationVersion(StelUtils::getApplicationVer sion());
QCoreApplication::setOrganizationDomain("stellarium.org"); QCoreApplication::setOrganizationDomain("stellarium.org");
QCoreApplication::setOrganizationName("stellarium"); QCoreApplication::setOrganizationName("stellarium");
// LP:1335611: Avoid troubles with search of the paths of the plugin s (deployments troubles) --AW #if defined(Q_OS_MAC)
QFileInfo appInfo(QString::fromUtf8(argv[0])); QFileInfo appInfo(QString::fromUtf8(argv[0]));
QDir appDir(appInfo.absolutePath()); QDir appDir(appInfo.absolutePath());
registerPluginsDir(appDir); appDir.cdUp();
QCoreApplication::addLibraryPath(appDir.absoluteFilePath("plugins"))
;
#elif defined(Q_OS_WIN)
QFileInfo appInfo(QString::fromUtf8(argv[0]));
QCoreApplication::addLibraryPath(appInfo.absolutePath());
#endif
QGuiApplication::setDesktopSettingsAware(false); QGuiApplication::setDesktopSettingsAware(false);
#ifndef USE_QUICKVIEW #ifndef USE_QUICKVIEW
QApplication::setStyle(QStyleFactory::create("Fusion")); QApplication::setStyle(QStyleFactory::create("Fusion"));
// The QApplication MUST be created before the StelFileMgr is initia lized. // The QApplication MUST be created before the StelFileMgr is initia lized.
QApplication app(argc, argv); QApplication app(argc, argv);
#else #else
QGuiApplication::setDesktopSettingsAware(false); QGuiApplication::setDesktopSettingsAware(false);
QGuiApplication app(argc, argv); QGuiApplication app(argc, argv);
 End of changes. 3 change blocks. 
16 lines changed or deleted 8 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/