Commit 4beee032 authored by Laurent Montel's avatar Laurent Montel 😁

kdelibs4support--

parent 6e7653d4
......@@ -107,7 +107,7 @@ install(TARGETS konquest ${INSTALL_TARGETS_DEFAULT_ARGS} )
########### install files ###############
install( PROGRAMS konquest.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( PROGRAMS org.kde.konquest.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES konquestui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/konquest )
ecm_install_icons( ICONS hi128-apps-konquest.png hi16-apps-konquest.png hi22-apps-konquest.png hi32-apps-konquest.png hi48-apps-konquest.png hi64-apps-konquest.png DESTINATION ${ICON_INSTALL_DIR} )
......
......@@ -24,7 +24,7 @@
#include "players/player.h"
#include "planet.h"
#include <KLocalizedString>
#include <KDebug>
#include <QDebug>
#include <cmath>
KRandomSequence Game::random = KRandomSequence();
......@@ -176,7 +176,7 @@ void Game::makeKill(Fleet *fleet, Player *player)
void Game::findWinner()
{
kDebug() << "Searching for survivors";
//qDebug() << "Searching for survivors";
// Check for survivors
Player *winner = 0;
foreach (Player *player, m_players) {
......@@ -185,18 +185,18 @@ void Game::findWinner()
}
if (!player->isDead()) {
if (winner) {
kDebug() << "Ok, returning 0";
//qDebug() << "Ok, returning 0";
return;
} else {
winner = player;
}
}
}
kDebug() << "Ok, returning " << winner;
//qDebug() << "Ok, returning " << winner;
if (winner)
{
// We got a winner
kDebug() << "Trying to stop";
//qDebug() << "Trying to stop";
this->stop();
emit(finished());
}
......
......@@ -32,7 +32,7 @@
#include <QPixmap>
#include <QKeyEvent>
#include <QIntValidator>
#include <KDebug>
#include <QDebug>
#include <kmessagebox.h>
......@@ -552,7 +552,7 @@ void
GameView::gameOver()
{
if (m_initCompleted) {
kDebug() << "Game over";
//qDebug() << "Game over";
/**
* @todo This is an attempt to remove duplicate information from screen.
......@@ -601,7 +601,7 @@ GameView::cleanupGame()
void
GameView::planetSelected( Planet *planet )
{
kDebug() << "planetSelected with " << m_guiState;
//qDebug() << "planetSelected with " << m_guiState;
switch( m_guiState ) {
case SOURCE_PLANET:
if( planet->player() == m_game->currentPlayer() ) {
......@@ -670,7 +670,7 @@ GameView::changeGameView()
{
bool isRunning = m_game->isRunning();
kDebug() << "Calling GameView::changeGameView" << isRunning;
//qDebug() << "Calling GameView::changeGameView" << isRunning;
m_messagesDock->setVisible(isRunning);
......
......@@ -17,7 +17,7 @@
*/
#include "localgame.h"
#include <KDebug>
#include <QDebug>
#include <QApplication>
LocalGame::LocalGame(QObject *parent) :
......@@ -29,10 +29,10 @@ void LocalGame::start()
{
if (!m_gameMachine.isRunning()) {
buildMachine();
kDebug() << "Starting machine";
//qDebug() << "Starting machine";
m_gameMachine.start();
qApp->processEvents(); // Really important : ignoring this will not apply the change soon enough
kDebug() << "Machine state" << m_gameMachine.isRunning();
//qDebug() << "Machine state" << m_gameMachine.isRunning();
}
}
......@@ -41,7 +41,7 @@ void LocalGame::stop()
if (m_gameMachine.isRunning()) {
m_gameMachine.stop();
qApp->processEvents(); // Really important : ignoring this will not apply the change soon enough
kDebug() << "Machine state" << m_gameMachine.isRunning();
//qDebug() << "Machine state" << m_gameMachine.isRunning();
}
}
......@@ -54,7 +54,7 @@ void LocalGame::addPlayer(Player *player)
void LocalGame::buildMachine()
{
kDebug() << "Building machine";
//qDebug() << "Building machine";
if (m_gameMachine.isRunning())
return;
......@@ -79,8 +79,8 @@ void LocalGame::buildMachine()
else
nextPlayer = m_players[i + 1];
kDebug() << "Adding transition from "
<< player->name() << " to " << nextPlayer->name();
//qDebug() << "Adding transition from "
//<< player->name() << " to " << nextPlayer->name();
player->addTransition(player, SIGNAL(donePlaying()), nextPlayer);
connect(player, SIGNAL(donePlaying()), this, SLOT(playerIsDone()));
}
......@@ -88,5 +88,5 @@ void LocalGame::buildMachine()
void LocalGame::playerIsDone()
{
kDebug() << "It seems a player is done :" << currentPlayer()->name();
//qDebug() << "It seems a player is done :" << currentPlayer()->name();
}
......@@ -36,7 +36,7 @@
#include <kactioncollection.h>
#include <kstandardaction.h>
#include <kstandardgameaction.h>
#include <kicon.h>
#include <QIcon>
#include <kstatusbar.h>
#include "game.h"
......@@ -87,13 +87,13 @@ MainWindow::setupActions()
//AB: there is no icon for disabled - KToolBar::insertButton shows the
//different state - QAction not :-(
m_measureAction = actionCollection()->addAction( QLatin1String( "game_measure" ) );
m_measureAction->setIcon( KIcon( QLatin1String( "go-jump" )) );
m_measureAction->setIcon( QIcon::fromTheme( QLatin1String( "go-jump" )) );
m_measureAction->setText( i18n("&Measure Distance") );
m_measureAction->setEnabled(false);
// Show fleet overview
m_fleetAction = actionCollection()->addAction( QLatin1String( "game_fleets" ) );
m_fleetAction->setIcon( KIcon( QLatin1String( "fork" )) );
m_fleetAction->setIcon( QIcon::fromTheme( QLatin1String( "fork" )) );
m_fleetAction->setText( i18n("&Fleet Overview") );
m_fleetAction->setEnabled(false);
......@@ -134,7 +134,7 @@ MainWindow::setupActions()
tabifyDockWidget(m_messagesDock, m_standingsDock);
m_standingsAction = actionCollection()->addAction(QLatin1String("view_standings"));
m_standingsAction->setIcon(KIcon(QLatin1String("help-contents")));
m_standingsAction->setIcon(QIcon::fromTheme(QLatin1String("help-contents")));
m_standingsAction->setText(i18n("Show &Standings"));
m_standingsAction->setCheckable(true);
m_standingsAction->setChecked(m_standingsDock->isVisible());
......
......@@ -31,7 +31,7 @@
#include <kiconloader.h>
#include <kglobalsettings.h>
#include <klocale.h>
#include <kdebug.h>
#include <QDebug>
#include <kcolorscheme.h>
#include "mapscene.h"
......
......@@ -24,7 +24,7 @@
#include <QGraphicsItem>
#include <QPainter>
#include <kdebug.h>
#include <QDebug>
#include "map.h"
#include "mapitems.h"
......
......@@ -136,3 +136,4 @@ X-DocPath=konquest/index.html
X-KDE-StartupNotify=true
X-DBUS-StartupType=Multi
Categories=Qt;KDE;Game;StrategyGame;
X-DBUS-ServiceName=org.kde.konquest
......@@ -26,7 +26,7 @@
#include "game.h"
#include "players/player.h"
#include <krandomsequence.h>
#include <KDebug>
#include <QDebug>
//---------------------------------------------------------------------------
// class Planet
......@@ -86,7 +86,7 @@ Planet::conquer( AttackFleet *conqueringFleet )
void
Planet::turn(const GameOptions &options)
{
kDebug() << "Planet::turn...";
//qDebug() << "Planet::turn...";
if (options.ProductionAfterConquere || !m_justconquered) {
if (m_owner->isNeutral()) {
......
......@@ -21,7 +21,7 @@
#include <cfloat>
#include <cmath>
#include <KDebug>
#include <QDebug>
#include <QMap>
#include <QMultiMap>
#include <QtAlgorithms>
......@@ -226,27 +226,27 @@ AiBecai::play()
int enemyAttackPerOwnPlanet = std::ceil((double) totalEnemyDefence / totalOwnPlanets);
kDebug() << "total own production: " << totalOwnProduction;
kDebug() << "total own fleet: " << totalOwnFleet;
kDebug() << "total own planets: " << totalOwnPlanets;
kDebug() << "total total planets: " << totalTotalPlanets;
kDebug() << "total enemy production: " << totalEnemyProduction;
kDebug() << "total enemy defence: " << totalEnemyDefence;
kDebug() << "total enemy planets: " << totalEnemyPlanets;
kDebug() << "minimum base defence fleet size: " << minimumBaseDefenceFleetSize;
kDebug() << "minimum capped base defence fleet size: " << minimumCappedBaseDefenceFleetSize;
kDebug() << "enemy attack per own planet: " << enemyAttackPerOwnPlanet;
kDebug() << "average non-own planet defence fleet size: " << averageNonOwnPlanetDefenceFleetSize;
kDebug() << "average own kill percentage: " << averageOwnKillPercentage;
kDebug() << "average own production: " << averageOwnProduction;
//qDebug() << "total own production: " << totalOwnProduction;
//qDebug() << "total own fleet: " << totalOwnFleet;
//qDebug() << "total own planets: " << totalOwnPlanets;
//qDebug() << "total total planets: " << totalTotalPlanets;
//qDebug() << "total enemy production: " << totalEnemyProduction;
//qDebug() << "total enemy defence: " << totalEnemyDefence;
//qDebug() << "total enemy planets: " << totalEnemyPlanets;
//qDebug() << "minimum base defence fleet size: " << minimumBaseDefenceFleetSize;
//qDebug() << "minimum capped base defence fleet size: " << minimumCappedBaseDefenceFleetSize;
//qDebug() << "enemy attack per own planet: " << enemyAttackPerOwnPlanet;
//qDebug() << "average non-own planet defence fleet size: " << averageNonOwnPlanetDefenceFleetSize;
//qDebug() << "average own kill percentage: " << averageOwnKillPercentage;
//qDebug() << "average own production: " << averageOwnProduction;
if (minimumBaseDefenceFleetSize > minimumCappedBaseDefenceFleetSize) {
kDebug() << "Reducing minimum base defence fleet size from " << minimumBaseDefenceFleetSize << " to " << minimumCappedBaseDefenceFleetSize << " (cap).";
//qDebug() << "Reducing minimum base defence fleet size from " << minimumBaseDefenceFleetSize << " to " << minimumCappedBaseDefenceFleetSize << " (cap).";
minimumBaseDefenceFleetSize = minimumCappedBaseDefenceFleetSize;
}
if (minimumBaseDefenceFleetSize > enemyAttackPerOwnPlanet) {
kDebug() << "Reducing minimum base defence fleet size from " << minimumBaseDefenceFleetSize << " to " << enemyAttackPerOwnPlanet << " (enemy attack per own planet).";
//qDebug() << "Reducing minimum base defence fleet size from " << minimumBaseDefenceFleetSize << " to " << enemyAttackPerOwnPlanet << " (enemy attack per own planet).";
minimumBaseDefenceFleetSize = enemyAttackPerOwnPlanet;
if (minimumBaseDefenceFleetSize < averageOwnProduction) {
......@@ -258,7 +258,7 @@ AiBecai::play()
// So keep up a minimum fleet hopefully large enough to destroy any
// (small) incoming enemy fleet.
kDebug() << "Minimum base defence is too low. Resetting to original minimum base defence fleet size!";
//qDebug() << "Minimum base defence is too low. Resetting to original minimum base defence fleet size!";
minimumBaseDefenceFleetSize = originalMinimumBaseDefenceFleetSize;
}
}
......@@ -272,7 +272,7 @@ AiBecai::play()
// The actual problem is that in this situation, the calculated
// minimum base defence fleet size is zero.
kDebug() << "No enemy planets found! Evenly distribute our fleet among our planets.";
//qDebug() << "No enemy planets found! Evenly distribute our fleet among our planets.";
minimumBaseDefenceFleetSize = totalOwnFleet / totalOwnPlanets;
}
......@@ -507,7 +507,7 @@ AiBecai::play()
}
if (attackFleetSize > 0) {
kDebug() << "Attacking " << attackPlanet->name() << " from " << home->name() << " with " << attackFleetSize << ".";
//qDebug() << "Attacking " << attackPlanet->name() << " from " << home->name() << " with " << attackFleetSize << ".";
m_game->attack(home, attackPlanet, attackFleetSize);
surplusFleetSize -= attackFleetSize;
......@@ -561,7 +561,7 @@ AiBecai::play()
// the support planet actually needs (or less), but for
// now this is good enough.
kDebug() << "Supporting (support) " << closestSupportPlanet->name() << " from " << home->name() << " with " << surplusFleetSize << ".";
//qDebug() << "Supporting (support) " << closestSupportPlanet->name() << " from " << home->name() << " with " << surplusFleetSize << ".";
m_game->attack(home, closestSupportPlanet, surplusFleetSize);
// We do not have any surplus fleet anymore to send
......@@ -581,7 +581,7 @@ AiBecai::play()
// needed.
if (surplusFleetSize > 3 * home->production()) { // > 0) {
kDebug() << "Supporting (upstream) " << closestUpstreamPlanet->name() << " from " << home->name() << " with " << surplusFleetSize << ".";
//qDebug() << "Supporting (upstream) " << closestUpstreamPlanet->name() << " from " << home->name() << " with " << surplusFleetSize << ".";
m_game->attack(home, closestUpstreamPlanet, surplusFleetSize);
}
}
......
......@@ -24,7 +24,7 @@
#include "../../../game.h"
#include "../../../planet.h"
#include <KDebug>
#include <QDebug>
#include <cmath>
#include <cfloat>
......@@ -41,7 +41,7 @@ AiDefault::AiDefault(Game *game,
void AiDefault::play()
{
kDebug() << "computer playing";
//qDebug() << "computer playing";
int ships = 0, minimumShips =10, shipCountFactor = 2;
Planet *target = 0;
......
......@@ -23,7 +23,7 @@
#include "computerplayer.h"
#include "../game.h"
#include <KDebug>
#include <QDebug>
#include <cmath>
#include <cfloat>
......
......@@ -21,7 +21,7 @@
*/
#include "localplayer.h"
#include <KDebug>
#include <QDebug>
LocalPlayer::LocalPlayer(Game *game, const QString &newName, const QColor &color) :
Player(game, newName, color)
......@@ -31,13 +31,13 @@ LocalPlayer::LocalPlayer(Game *game, const QString &newName, const QColor &color
void LocalPlayer::play()
{
kDebug() << name() << "::play";
//qDebug() << name() << "::play";
emit(canPlay());
}
void LocalPlayer::done()
{
kDebug() << name() << "::done";
//qDebug() << name() << "::done";
emit(donePlaying());
}
......@@ -20,7 +20,7 @@
#include "../game.h"
#include "../planet.h"
#include <QColor>
#include <KDebug>
#include <QDebug>
#include <QApplication>
NeutralPlayer::NeutralPlayer(Game *game) :
......@@ -40,7 +40,7 @@ bool NeutralPlayer::isDead()
void NeutralPlayer::play()
{
kDebug() << "NeutralPlayer::play";
//qDebug() << "NeutralPlayer::play";
// Go on each attack...
foreach (Player *player, m_game->players()) {
......@@ -63,7 +63,7 @@ void NeutralPlayer::play()
// Go over each planet, adding its ships
foreach (Planet *planet, m_game->map()->planets()) {
kDebug() << "Turn for planet " << planet->name();
//qDebug() << "Turn for planet " << planet->name();
planet->turn(m_game->options());
}
......
......@@ -18,7 +18,7 @@
*/
#include "player.h"
#include <KDebug>
#include <QDebug>
#include "../game.h"
#include "../planet.h"
......@@ -42,8 +42,8 @@ void Player::onEntry(QEvent *event)
if (isNeutral())
m_game->newTurn();
kDebug() << "Entering state for player " << m_name;
kDebug() << this->metaObject()->className();
//qDebug() << "Entering state for player " << m_name;
//qDebug() << this->metaObject()->className();
m_game->setCurrentPlayer(this);
Q_UNUSED(event);
if (isDead())
......@@ -55,8 +55,8 @@ void Player::onEntry(QEvent *event)
void Player::onExit(QEvent *event)
{
Q_UNUSED(event);
kDebug() << "Exiting state for player " << m_name;
kDebug() << "We are moving our new attacks to our attacks";
//qDebug() << "Exiting state for player " << m_name;
//qDebug() << "We are moving our new attacks to our attacks";
for(AttackFleetList::iterator a = m_standingOrders.begin(); a != m_standingOrders.end(); ++a)
{
AttackFleet* fleet = (*a)->source->fleet().spawnAttackFleet((*a)->destination, (*a)->shipCount(), (*a)->arrivalTurn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment