From 0dbeeeb9f20945e8edfd2d049a260283a84a8d75 Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 29 Sep 2024 19:20:32 +1000 Subject: 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 (cherry picked from commit 9ef39acd5d211e5a8164bfb4a075e2e0cd6f9bee) --- src/app/mainWindow.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/app/mainWindow.cpp') 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(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; } -- cgit v1.2.1