1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license that can
* be found in the License.html file in the root of the source tree.
*/
#include "mainwindow.h"
#include <QApplication>
//#include <QtCore/QtPlugin>
//#if defined(_WIN32) && QT_VERSION >= 0x00050000 //Qt5
//Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
//#endif
#ifdef __MACOSX__
#include <ApplicationServices/ApplicationServices.h>
#endif //__MACOSX__
int main(int argc, char *argv[])
{
#if QT_VERSION >= 0x050700
char disable_security[] = "--disable-web-security"; //Fonts are not loaded if this is not set
char **old_argv = argv;
argv = new char*[argc + 2];
memcpy(argv, old_argv, argc * sizeof(char*));
argv[argc] = disable_security;
argc++;
argv[argc] = NULL;
#endif
QApplication a(argc, argv);
a.setApplicationName("MediaConch");
MediaConch::MainWindow w;
w.show();
int ret = a.exec();
#if QT_VERSION >= 0x050700
delete [] argv;
#endif
return ret;
}
|