comparison src/main.cpp @ 520:30fbc53d8150

Merge latest SV 3.0 branch code
author Chris Cannam
date Fri, 19 Aug 2016 15:58:57 +0100
parents b11b82c2e1af
children 25aa28a27252
comparison
equal deleted inserted replaced
519:34668179c803 520:30fbc53d8150
21 #include "base/PropertyContainer.h" 21 #include "base/PropertyContainer.h"
22 #include "base/Preferences.h" 22 #include "base/Preferences.h"
23 #include "widgets/TipDialog.h" 23 #include "widgets/TipDialog.h"
24 #include "widgets/InteractiveFileFinder.h" 24 #include "widgets/InteractiveFileFinder.h"
25 #include "transform/TransformFactory.h" 25 #include "transform/TransformFactory.h"
26 #include "svcore/plugin/PluginScan.h"
26 27
27 #include <QMetaType> 28 #include <QMetaType>
28 #include <QApplication> 29 #include <QApplication>
29 #include <QDesktopWidget> 30 #include <QDesktopWidget>
30 #include <QMessageBox> 31 #include <QMessageBox>
241 } 242 }
242 application.installTranslator(&qtTranslator); 243 application.installTranslator(&qtTranslator);
243 244
244 StoreStartupLocale(); 245 StoreStartupLocale();
245 246
247 // Make known-plugins query as early as possible. This depends on
248 // our helper executable, which must exist either in the same
249 // directory as this one or (preferably) a subdirectory called
250 // "checker".
251 QString myDir = application.applicationDirPath();
252 QString helperPath = myDir + "/checker/plugin-checker-helper";
253 QString helperSuffix = "";
254 #ifdef _WIN32
255 helperSuffix = ".exe";
256 #endif
257 if (!QFile(helperPath + helperSuffix).exists()) {
258 cerr << "NOTE: helper not found at " << (helperPath + helperSuffix)
259 << ", trying in my own directory" << endl;
260 helperPath = myDir + "/plugin-checker-helper";
261 }
262 helperPath += helperSuffix;
263 if (!QFile(helperPath + helperSuffix).exists()) {
264 cerr << "NOTE: helper not found at " << (helperPath + helperSuffix)
265 << endl;
266 }
267 PluginScan::getInstance()->scan(helperPath);
268
246 // Permit size_t and PropertyName to be used as args in queued signal calls 269 // Permit size_t and PropertyName to be used as args in queued signal calls
247 qRegisterMetaType<size_t>("size_t"); 270 qRegisterMetaType<size_t>("size_t");
248 qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName"); 271 qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName");
249 272
250 MainWindow::SoundOptions options = MainWindow::WithEverything; 273 MainWindow::SoundOptions options = MainWindow::WithEverything;