comparison main/main.cpp @ 744:ccf3749cbaea

Fix to OS/X build -- we no longer want to override the plugin path as we're using qt.conf instead
author Chris Cannam
date Mon, 07 Jul 2014 07:55:49 +0100
parents 5ebce191aa04
children 7374badd5f9e
comparison
equal deleted inserted replaced
743:4cec335bba8f 744:ccf3749cbaea
196 QApplication(argc, argv), 196 QApplication(argc, argv),
197 m_readyForFiles(false), 197 m_readyForFiles(false),
198 m_filepathQueue(QStringList()), 198 m_filepathQueue(QStringList()),
199 m_mainWindow(0) 199 m_mainWindow(0)
200 { 200 {
201 #ifdef Q_OS_MAC
202 // Override the Qt plugin load path. The default contains the
203 // Qt installation location as well as the application
204 // directory, but we don't ever want to load plugins from
205 // outside the app bundle because we don't know for sure what
206 // (potentially different) versions of the Qt framework
207 // libraries they may have dyld dependencies on.
208 QString apploc(applicationFilePath());
209 apploc.truncate(apploc.lastIndexOf(QLatin1Char('/')));
210 apploc = QDir(apploc).canonicalPath();
211 if (QFile::exists(apploc)) {
212 setLibraryPaths(QStringList() << apploc);
213 } else {
214 setLibraryPaths(QStringList());
215 }
216 #endif
217 } 201 }
218 virtual ~SVApplication() { } 202 virtual ~SVApplication() { }
219 203
220 void setMainWindow(MainWindow *mw) { m_mainWindow = mw; } 204 void setMainWindow(MainWindow *mw) { m_mainWindow = mw; }
221 void releaseMainWindow() { m_mainWindow = 0; } 205 void releaseMainWindow() { m_mainWindow = 0; }