Changeset 181 for smplayer/trunk/src/myapplication.cpp
- Timestamp:
- Aug 31, 2016, 5:31:04 PM (9 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 179
- Property svn:mergeinfo changed
-
smplayer/trunk/src/myapplication.cpp
r176 r181 18 18 19 19 #include "myapplication.h" 20 21 #ifdef SINGLE_INSTANCE 22 MyApplication::MyApplication ( const QString & appId, int & argc, char ** argv ) 23 : QtSingleApplication(appId, argc, argv) 24 { 25 #if defined(USE_WINEVENTFILTER) && QT_VERSION >= 0x050000 26 installNativeEventFilter(this); 27 #endif 28 }; 29 30 #else 31 32 MyApplication::MyApplication ( const QString & appId, int & argc, char ** argv ) 33 : QApplication(argc, argv) 34 { 35 #if defined(USE_WINEVENTFILTER) && QT_VERSION >= 0x050000 36 installNativeEventFilter(this); 37 #endif 38 }; 39 40 #endif 41 42 #if defined(USE_WINEVENTFILTER) && QT_VERSION >= 0x050000 43 bool MyApplication::nativeEventFilter(const QByteArray &eventType, void *message, long *result) { 44 //qDebug() << "MyApplication::nativeEventFilter:" <<eventType; 45 46 if (eventType == "windows_generic_MSG" || eventType == "windows_dispatcher_MSG") { 47 MSG * m = static_cast<MSG *>(message); 48 return winEventFilter(m, result); 49 } 50 51 return false; 52 } 53 #endif 20 54 21 55 #ifdef USE_WINEVENTFILTER … … 122 156 123 157 if (eat_key) { 124 qDebug( "MyApplication::winEventFilter: ignoring key %X", msg->wParam);158 qDebug() << "MyApplication::winEventFilter: ignoring key" << msg->wParam; 125 159 last_appcommand = 0; 126 *result = true;160 //*result = true; 127 161 return true; 128 162 } … … 165 199 QWidget * w = QApplication::focusWidget(); 166 200 if (w) QCoreApplication::sendEvent(w, &event); 167 *result = true;201 //*result = true; 168 202 return true; 169 203 }
Note:
See TracChangeset
for help on using the changeset viewer.