[SCM] knights packaging branch, master, updated. upstream/2.2.0-25-g3070cdf
José Manuel Santamaría Lema
santa-guest at alioth.debian.org
Tue Mar 22 20:57:33 UTC 2011
The following commit has been merged in the master branch:
commit 4a7a6587664151ee942155c24b1a3ee5b01a9eb8
Author: José Manuel Santamaría Lema <panfaust at gmail.com>
Date: Tue Mar 22 15:42:20 2011 +0100
Update patches.
---
debian/changelog | 3 +
debian/patches/03_dont_crash_fics.diff | 17 --
debian/patches/04_stop_clock_game_over.diff | 224 ---------------------------
debian/patches/series | 2 -
4 files changed, 3 insertions(+), 243 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 22d6050..46c0204 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
knights (2.3.1-1) UNRELEASED; urgency=low
* New upstream release.
+ * Update patches:
+ - Remove 03_dont_crash_fics.diff, no longer needed.
+ - Remove 04_stop_clock_game_over.diff, no longer needed.
-- José Manuel Santamaría Lema <panfaust at gmail.com> Tue, 22 Mar 2011 14:05:39 +0100
diff --git a/debian/patches/03_dont_crash_fics.diff b/debian/patches/03_dont_crash_fics.diff
deleted file mode 100644
index ab5b825..0000000
--- a/debian/patches/03_dont_crash_fics.diff
+++ /dev/null
@@ -1,17 +0,0 @@
-Author: José Manuel Santamaría Lema <panfaust at gmail.com>
-Description: This patch avoids a crash when you play second game with FICS
- protocol. The problem is that the FicsProtocol objects triggers its own
- delete after emitting a signal. Thanks to David Faure for his hint to find out
- the problem.
-Forwarded: no
---- a/src/knightsview.cpp
-+++ b/src/knightsview.cpp
-@@ -104,7 +104,7 @@
- KMessageBox::sorry ( this, text );
- }
- }
-- emit gameNew();
-+ //emit gameNew();
- }
-
- void KnightsView::settingsChanged()
diff --git a/debian/patches/04_stop_clock_game_over.diff b/debian/patches/04_stop_clock_game_over.diff
deleted file mode 100644
index 1119d09..0000000
--- a/debian/patches/04_stop_clock_game_over.diff
+++ /dev/null
@@ -1,224 +0,0 @@
-Author: José Manuel Santamaría Lema <panfaust at gmail.com>
-Description: This patch stops the clock when game finish.
-Forwarded: no
---- a/src/knights.cpp
-+++ b/src/knights.cpp
-@@ -170,6 +170,8 @@
-
- connect ( m_view, SIGNAL ( activePlayerChanged ( Color ) ), playerClock, SLOT ( setActivePlayer ( Color ) ) );
- connect ( m_view, SIGNAL ( displayedPlayerChanged ( Color ) ), playerClock, SLOT ( setDisplayedPlayer ( Color ) ) );
-+ connect ( m_view, SIGNAL ( gameNew () ), playerClock, SLOT ( enableClock() ) );
-+ connect ( m_view, SIGNAL ( gameOver () ), playerClock, SLOT ( disableClock() ) );
-
- bool protocolEmitsGameOver = m_protocol && m_protocol->supportedFeatures() & Protocol::GameOver;
- if ( !protocolEmitsGameOver )
---- a/src/knightsview.cpp
-+++ b/src/knightsview.cpp
-@@ -87,6 +87,7 @@
- kDebug() << "Received gameOver() from " << sender()->metaObject()->className();
- QString text;
- QString caption;
-+ emit gameOver();
- if ( winner == NoColor )
- {
- text = i18n ( "The game ended in a draw" );
---- a/src/knightsview.h
-+++ b/src/knightsview.h
-@@ -84,6 +84,10 @@
- void activePlayerChanged ( Color );
- void displayedPlayerChanged ( Color );
-
-+ //Other signals
-+
-+ void gameOver();
-+
- private slots:
- void settingsChanged();
- void resizeScene();
---- a/src/clockwidget.cpp
-+++ b/src/clockwidget.cpp
-@@ -6,7 +6,7 @@
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License or (at your option) version 3 or any later version
-- accepted by the membership of KDE e.V. (or its successor approved
-+ accepted by the membership of KDE e.V. (or its successor approved
- by the membership of KDE e.V.), which shall act as a proxy
- defined in Section 14 of version 3 of the license.
-
-@@ -40,6 +40,7 @@
-
- m_timeIncrement[White] = 0;
- m_timeIncrement[Black] = 0;
-+ m_disabled = false;
- }
-
- ClockWidget::~ClockWidget()
-@@ -49,15 +50,17 @@
-
- void ClockWidget::setActivePlayer ( Color color )
- {
-- killTimer ( m_timerId[m_activePlayer] );
-- if ( !m_started [ color ] )
-- {
-- m_started [ color ] = true;
-- return;
-+ if (!m_disabled) {
-+ killTimer ( m_timerId[m_activePlayer] );
-+ if ( !m_started [ color ] )
-+ {
-+ m_started [ color ] = true;
-+ return;
-+ }
-+ incrementTime ( m_activePlayer, m_timeIncrement[m_activePlayer] );
-+ m_timerId[color] = startTimer ( timerInterval );
-+ m_activePlayer = color;
- }
-- incrementTime ( m_activePlayer, m_timeIncrement[m_activePlayer] );
-- m_timerId[color] = startTimer ( timerInterval );
-- m_activePlayer = color;
- }
-
- void ClockWidget::setDisplayedPlayer ( Color color )
-@@ -83,20 +86,22 @@
-
- void ClockWidget::setCurrentTime ( Color color, const QTime& time )
- {
-- m_currentTime[color] = time;
-+ if (!m_disabled) {
-+ m_currentTime[color] = time;
-+
-+ const int miliSeconds = time.hour() * 3600 * 1000 + time.minute() * 60 * 1000 + time.second() * 1000 + time.msec();
-+ const int units = miliSeconds / timerInterval;
-+ QProgressBar* bar = ( color == White ) ? ui->progressW : ui->progressB;
-+ if ( units > bar->maximum() )
-+ {
-+ bar->setMaximum ( units );
-+ }
-+ bar->setValue ( units );
-+ bar->setFormat ( time.toString( QLatin1String("h:mm:ss") ) );
-
-- const int miliSeconds = time.hour() * 3600 * 1000 + time.minute() * 60 * 1000 + time.second() * 1000 + time.msec();
-- const int units = miliSeconds / timerInterval;
-- QProgressBar* bar = ( color == White ) ? ui->progressW : ui->progressB;
-- if ( units > bar->maximum() )
-- {
-- bar->setMaximum ( units );
-+ Clock* clock = ( color == White ) ? ui->clockW : ui->clockB;
-+ clock->setTime ( time );
- }
-- bar->setValue ( units );
-- bar->setFormat ( time.toString( QLatin1String("h:mm:ss") ) );
--
-- Clock* clock = ( color == White ) ? ui->clockW : ui->clockB;
-- clock->setTime ( time );
- }
-
- void ClockWidget::setTimeLimit ( Color color, const QTime& time )
-@@ -124,43 +129,63 @@
-
- void ClockWidget::incrementTime ( Color color, int miliseconds )
- {
-- switch ( color )
-- {
-- case White:
-- setCurrentTime ( White, m_currentTime[White].addMSecs ( miliseconds ) );
-- if ( ui->progressW->value() <= 0 )
-- {
-- emit timeOut ( White );
-- emit opponentTimeOut ( Black );
-- }
-- break;
-- case Black:
-- setCurrentTime ( Black, m_currentTime[Black].addMSecs ( miliseconds ) );
-- if ( ui->progressB->value() <= 0 )
-- {
-- emit timeOut ( Black );
-- emit opponentTimeOut ( White );
-- }
-- break;
-- default:
-- break;
-+ if (!m_disabled) {
-+ switch ( color )
-+ {
-+ case White:
-+ setCurrentTime ( White, m_currentTime[White].addMSecs ( miliseconds ) );
-+ if ( ui->progressW->value() <= 0 )
-+ {
-+ emit timeOut ( White );
-+ emit opponentTimeOut ( Black );
-+ }
-+ break;
-+ case Black:
-+ setCurrentTime ( Black, m_currentTime[Black].addMSecs ( miliseconds ) );
-+ if ( ui->progressB->value() <= 0 )
-+ {
-+ emit timeOut ( Black );
-+ emit opponentTimeOut ( White );
-+ }
-+ break;
-+ default:
-+ break;
-+ }
- }
- }
-
- void Knights::ClockWidget::timerEvent ( QTimerEvent* event )
- {
- Q_UNUSED ( event )
-- incrementTime ( m_activePlayer, -timerInterval );
-+ if (!m_disabled) {
-+ incrementTime ( m_activePlayer, -timerInterval );
-+ }
- }
-
- void ClockWidget::pauseClock()
- {
-- killTimer ( m_timerId[m_activePlayer] );
-+ if (!m_disabled) {
-+ killTimer ( m_timerId[m_activePlayer] );
-+ }
- }
-
- void ClockWidget::resumeClock()
- {
-- m_timerId[m_activePlayer] = startTimer ( timerInterval );
-+ if (!m_disabled) {
-+ m_timerId[m_activePlayer] = startTimer ( timerInterval );
-+ }
-+}
-+
-+void ClockWidget::disableClock()
-+{
-+ killTimer ( m_timerId[Black] );
-+ killTimer ( m_timerId[White] );
-+ m_disabled = true;
-+}
-+
-+void ClockWidget::enableClock()
-+{
-+ m_disabled = false;
- }
-
- // kate: indent-mode cstyle; space-indent on; indent-width 4; replace-tabs on; replace-tabs on; replace-tabs on;
---- a/src/clockwidget.h
-+++ b/src/clockwidget.h
-@@ -56,6 +56,9 @@
- void pauseClock();
- void resumeClock();
-
-+ void disableClock();
-+ void enableClock();
-+
- Q_SIGNALS:
- void timeOut ( Color );
- void opponentTimeOut ( Color );
-@@ -73,6 +76,7 @@
- QMap<Color, QGroupBox*> m_box;
- QMap<Color, int> m_timeIncrement;
- QMap<Color, bool> m_started;
-+ bool m_disabled;
- };
- }
-
diff --git a/debian/patches/series b/debian/patches/series
index 1b043e5..ffadca0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1 @@
02_no_hotnewstuff.diff
-03_dont_crash_fics.diff
-04_stop_clock_game_over.diff
--
knights packaging
More information about the pkg-kde-commits
mailing list