diff options
author | mio <[email protected]> | 2024-09-29 19:20:32 +1000 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-09-30 21:59:48 +0900 |
commit | 0dbeeeb9f20945e8edfd2d049a260283a84a8d75 (patch) | |
tree | 6e8c72ac03df7fb9b12da5276bb77f9c4e9c96f1 /src/app/mainWindow.cpp | |
parent | f41da351c6fa85a36a29611edc98cf74834b43af (diff) | |
download | codeine-0dbeeeb9f20945e8edfd2d049a260283a84a8d75.tar.gz codeine-0dbeeeb9f20945e8edfd2d049a260283a84a8d75.zip |
Address -Wall warnings
VideoWindow::ExposeEvent wasn't being used correctly; it should be a
TQCustomEvent (although, the 3000 type is already being used for
forwarding XINE_PROGRESS_EVENT).
While the pts_per_smpls part never seemed to be encountered, it would
have resulted in a floating point exception as it's always 0. Commented
out to leave a hint as to what the code should be doing.
Resolves: TDE/codeine#2
Signed-off-by: mio <[email protected]>
(cherry picked from commit 9ef39acd5d211e5a8164bfb4a075e2e0cd6f9bee)
Diffstat (limited to 'src/app/mainWindow.cpp')
-rw-r--r-- | src/app/mainWindow.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/app/mainWindow.cpp b/src/app/mainWindow.cpp index 8e01fd5..159d84c 100644 --- a/src/app/mainWindow.cpp +++ b/src/app/mainWindow.cpp @@ -706,13 +706,19 @@ action( const char *name ) TDEActionCollection *actionCollection = nullptr; TDEAction *action = nullptr; - if( mainWindow = (MainWindow*)kapp->mainWidget() ) - if( actionCollection = mainWindow->actionCollection() ) - action = actionCollection->action( name ); + mainWindow = dynamic_cast<MainWindow *>(kapp->mainWidget()); + if (mainWindow) + { + actionCollection = mainWindow->actionCollection(); + if (actionCollection) + { + action = actionCollection->action(name); + } + } - Q_ASSERT( mainWindow ); - Q_ASSERT( actionCollection ); - Q_ASSERT( action ); + Q_ASSERT(mainWindow); + Q_ASSERT(actionCollection); + Q_ASSERT(action); return action; } |