Solved Target pattern error (Qt4.85 on Mojave 10.14.6)
-
@SGaist
After changing the lib, include paths and with qt_phonon4qt5.pri coping to modules.able to compile, but it crashes,
This is happing because of
QKeySequence key = shortcut_it.key(); // Connect every shortcut with the setFocus slot, to ensure proper focus. connect( shortcut, SIGNAL( activated() ), this , SLOT( setFocus() ), Qt::UniqueConnection ); switch ( key )
/src/main/mainwindow.cpp:223: error: statement requires expression of integer type ('QKeySequence' invalid) switch ( key ) ^ ~~~
-
That's invalid C++ code. You cannot switch on a type like that.
What do the cases contain ?
-
@SGaist
This works fine on older version, On Win7 worked without errorQShortcut* shortcut = shortcut_it.value().get(); QKeySequence key = shortcut_it.key(); switch ( key ) { case Qt::Key_F: connect( shortcut, SIGNAL( activated() ), this , SLOT( on_actionFull_Screen_triggered() ) ); break; case Qt::Key_Escape: connect( shortcut, SIGNAL( activated() ), this , SLOT( on_actionExit_triggered() ) ); break; default : break; }
-
That was just luck. The current error you get is correct.