int main(int argc, char **argv) { try { osDebugLog& theDebugLog = osDebugLog::instance(); theDebugLog.initialize(L"Compressonator.log"); appQtApplication app(argc, argv); app.setWindowIcon(QIcon(":/CompressonatorGUI/Images/acompress-256.png")); m_thread = new MyThread(); // register the memory allocation failure event handler. std::set_new_handler(appQtApplication::AppMemAllocFailureHandler); /// connect the Qt application to the slots that handle the out of memory signals: QObject::connect(qApp, SIGNAL(AppMemAllocFailureSignal()), qApp, SLOT(OnAppMemAllocFailureSignal())); QObject::connect(qApp, SIGNAL(ClientMemAllocFailureSignal()), qApp, SLOT(OnClientMemAllocFailureSignal())); //------------------------------------------------ // Bug reporting //------------------------------------------------- // QPixmap iconPixMap; // acIconId iconID = AC_ICON_DEBUG_MODE; // Adding Exception Handle // acSetIconInPixmap(iconPixMap, iconID, AC_64x64_ICON); const QIcon iconPixMap(":/CompressonatorGUI/Images/compress.png"); const QString ProductName = "Compressonator"; acSendErrorReportDialog *m_pSendErrorReportDialog = new acSendErrorReportDialog(NULL, ProductName, iconPixMap); m_pSendErrorReportDialog->registerForRecievingDebuggedProcessEvents(); //---------------------------------- // Load plugin List for processing //---------------------------------- g_pluginManager.registerStaticPlugin("IMAGE", "ASTC", make_Plugin_ASTC); g_pluginManager.registerStaticPlugin("IMAGE", "DDS", make_Plugin_DDS); g_pluginManager.registerStaticPlugin("IMAGE", "EXR", make_Plugin_EXR); g_pluginManager.registerStaticPlugin("IMAGE", "KTX", make_Plugin_KTX); g_pluginManager.registerStaticPlugin("FILTER", "BOXFILTER", make_Plugin_BoxFilter); g_pluginManager.registerStaticPlugin("IMAGE", "ANALYSIS", make_Plugin_CAnalysis); g_pluginManager.getPluginList("/plugins"); g_bAbortCompression = false; cpMainComponents mainComponents(NULL,NULL); #ifdef MSG_HANDLER PrintStatusLine = &mainComponents.PrintStatus; qInstallMsgHandler(mainComponents.msgHandler); #endif QDesktopWidget *desktop = new QDesktopWidget(); mainComponents.resize(desktop->screenGeometry().width()*PERCENTAGE_OF_MONITOR_WIDTH_FOR_SCREEN, desktop->screenGeometry().height()*PERCENTAGE_OF_MONITOR_HEIGHT_FOR_SCREEN); mainComponents.show(); app.setStyleSheet(SEPERATOR_STYLE); return app.exec(); } catch (std::exception &e) { qDebug() << e.what(); } catch (...) { qDebug() << "Unknown Error"; } return(-1); }