Bug 316623 - Selecting new game aborts existing game without confirmation
Summary: Selecting new game aborts existing game without confirmation
Status: RESOLVED FIXED
Alias: None
Product: konquest
Classification: Applications
Component: general (show other bugs)
Version: 2.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Pierre Ducroquet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-12 22:39 UTC by michael
Modified: 2013-03-14 18:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description michael 2013-03-12 22:39:46 UTC
konquest exectutes the following on selecting game->new.
MainWindow::startNewGame()
{
    m_gameView->deleteLater();
    m_game->deleteLater();
    setupGameView();
    m_gameView->startNewGame();
}

By calling setupGameView(); we are aborting the current game regardlless of whether or not the new game dialog is cancled. This should only only be done if GameView::shutdownGame() returns true. Further, since startNewGame is called on the new GameView it will never display confirmation before terminating the existing game.


Reproducible: Always

Steps to Reproduce:
1. Start new game
2. Select new game
3. Click cancel

Actual Results:  
Aborts existing game.

Expected Results:  
Should give confirmation dialog.

Sorry I had a little trouble with the interface. Submited to master
in commit 0f4655733289d6703db20d89d9d49b7732d303fd. Please see
https://git.reviewboard.kde.org/r/108460/. I haved requested that this
patch be back-ported to kde 10 as well.
Comment 1 Albert Astals Cid 2013-03-14 18:36:04 UTC
Git commit ac85b0308b3f0886aa3c749cfe0ac1673986a0ba by Albert Astals Cid, on behalf of Michael Reeves.
Committed on 26/01/2013 at 18:08.
Pushed by aacid into branch 'KDE/4.10'.

On selecting new game don't abort existing game without confirmation

REVIEW: 108460
FIXED-IN: 4.10.2
(cherry picked from commit 0f4655733289d6703db20d89d9d49b7732d303fd)

M  +10   -4    gameview.cc
M  +1    -0    gameview.h
M  +7    -4    mainwin.cc

http://commits.kde.org/konquest/ac85b0308b3f0886aa3c749cfe0ac1673986a0ba