--- Vago/trunk/Vago/main.cpp 2014/04/26 12:40:47 999 +++ Vago/trunk/Vago/main.cpp 2016/12/09 19:04:18 1061 @@ -1,49 +1,16 @@ -//#define USING_VM_TABLET_WARNING_FIX // Comment this line if not using a mac vm - -#ifdef USING_VM_TABLET_WARNING_FIX -#include -void myMessageOutput(QtMsgType type, const QMessageLogContext &, const QString & str); -#endif - #include #include "mainwindow.h" +// TODO add lineedit to other lineedits that can receive files or folders, create additional funtions in lineedit where we can specify what kind of argument it accepts +// Example: setAllowFolders(), setAllowFiles() or setAcceptedTypes(Enum from QtFiles) int main(int argc, char *argv[]) { -#ifdef USING_VM_TABLET_WARNING_FIX - qInstallMessageHandler(myMessageOutput); -#endif - QApplication a(argc, argv); MainWindow w; w.show(); a.setStyleSheet("QStatusBar::item { border: 0px; }"); //hide QLabels border in status bar //http://qt-project.org/forums/viewthread/18743 - + return a.exec(); } -#ifdef USING_VM_TABLET_WARNING_FIX -void myMessageOutput(QtMsgType type, const QMessageLogContext &, const QString & str) -{ - - const char * msg = str.toStdString().c_str(); - - switch (type) { - case QtWarningMsg: - if(QString(msg)=="QNSView handleTabletEvent: This tablet device is unknown (received no proximity event for it). Discarding event."){ // ignore this message - return; - } - else{ - fprintf(stderr, "%s\n", msg); - break; - } - case QtFatalMsg: - fprintf(stderr, "%s\n", msg); - abort(); - default: - fprintf(stderr, "%s\n", msg); - break; - } -} -#endif