diff options
| author | mio <stigma@disroot.org> | 2024-09-29 19:20:32 +1000 |
|---|---|---|
| committer | mio <stigma@disroot.org> | 2024-09-29 20:45:04 +1000 |
| commit | 9ef39acd5d211e5a8164bfb4a075e2e0cd6f9bee (patch) | |
| tree | 96cae6b7241c050209b979dec64dc42e34f98ee3 /src/app/mainWindow.cpp | |
| parent | c0311bdfc33f07dbde42a9b4f4758a6c505aae84 (diff) | |
| download | codeine-9ef39acd5d211e5a8164bfb4a075e2e0cd6f9bee.tar.gz codeine-9ef39acd5d211e5a8164bfb4a075e2e0cd6f9bee.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 <stigma@disroot.org>
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; } |
