Commit 4151641f authored by Laurent Montel's avatar Laurent Montel 😁

port++

parent 9335f8f6
......@@ -34,7 +34,7 @@
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kdebug.h>
#include <QDebug>
#include <QDebug>
#include <ktoolbar.h>
......@@ -169,20 +169,20 @@ KGoldrunner::KGoldrunner()
// Do NOT paint main widget yet (title bar, menu, blank playfield).
// Instead, queue a call to the "KGoldrunner_2" constructor extension.
QMetaObject::invokeMethod (this, "KGoldrunner_2", Qt::QueuedConnection);
kDebug() << "QMetaObject::invokeMethod (this, \"KGoldrunner_2\") done ... ";
kDebug() << "1st scan of event-queue ...";
//qDebug() << "QMetaObject::invokeMethod (this, \"KGoldrunner_2\") done ... ";
//qDebug() << "1st scan of event-queue ...";
}
void KGoldrunner::KGoldrunner_2()
{
kDebug() << "Entered constructor extension ...";
//qDebug() << "Entered constructor extension ...";
// Queue a call to the "initGame" method. This renders and paints the
// initial graphics, but only AFTER the initial main-window resize events
// have been seen and the final SVG scale is known.
QMetaObject::invokeMethod (game, "initGame", Qt::QueuedConnection);
kDebug() << "QMetaObject::invokeMethod (game, \"initGame\") done ... ";
kDebug() << "2nd scan of event-queue ...";
//qDebug() << "QMetaObject::invokeMethod (game, \"initGame\") done ... ";
//qDebug() << "2nd scan of event-queue ...";
}
KGoldrunner::~KGoldrunner()
......@@ -781,7 +781,7 @@ void KGoldrunner::setEditMenu (bool on_off)
if (on_off){
// Set the editToolbar icons to the current tile-size.
kDebug() << "ToolBar icon size:" << scene->tileSize ();
//qDebug() << "ToolBar icon size:" << scene->tileSize ();
toolBar ("editToolbar")->setIconSize (scene->tileSize ());
// Set the editToolbar icons up with pixmaps of the current theme.
......@@ -833,7 +833,7 @@ void KGoldrunner::saveProperties (KConfigGroup & /* config - unused */)
// config file. Anything you write here will be available
// later when this app is restored.
kDebug() << "I am in KGoldrunner::saveProperties.";
//qDebug() << "I am in KGoldrunner::saveProperties.";
}
void KGoldrunner::readProperties (const KConfigGroup & /* config - unused */)
......@@ -843,7 +843,7 @@ void KGoldrunner::readProperties (const KConfigGroup & /* config - unused */)
// the app is being restored. Read in here whatever you wrote
// in 'saveProperties'
kDebug() << "I am in KGoldrunner::readProperties.";
//qDebug() << "I am in KGoldrunner::readProperties.";
}
void KGoldrunner::optionsConfigureKeys()
......@@ -1033,4 +1033,4 @@ QSize KGoldrunner::sizeHint() const
return QSize (640, 600);
}
#include "kgoldrunner.moc"
......@@ -19,7 +19,7 @@
#define KGRDEBUG_H
static int dbgLevel = 0; // Local to file where kgrdebug.h is included.
#include <KDebug>
#define dbk kDebug()
#define dbk1 if(dbgLevel>=1)kDebug()
#define dbk2 if(dbgLevel>=2)kDebug()
......
......@@ -336,4 +336,4 @@ int KGrMessage::warning (QWidget * parent, const QString &caption,
return (ans);
}
#include "kgrdialog.moc"
......@@ -959,4 +959,4 @@ void KGrEditor::endEdit (int button)
}
}
#include "kgreditor.moc"
......@@ -2221,5 +2221,5 @@ void KGrGame::myMessage (QWidget * parent, const QString &title, const QString &
freeze (ProgramPause, false);
}
#include "kgrgame.moc"
// vi: set sw=4 :
......@@ -22,7 +22,7 @@
#include <QDir>
#include <KLocale>
#include <KDebug>
#include <QDebug>
KGrGameIO::KGrGameIO (QWidget * pView)
:
......@@ -55,7 +55,7 @@ IOStatus KGrGameIO::fetchGameListData
filePath = dir + filename;
KGrGameData * g = initGameData (o);
gameList.append (g);
// kDebug()<< "GAME PATH:" << filePath;
// //qDebug()<< "GAME PATH:" << filePath;
openFile.setFileName (filePath);
......@@ -95,7 +95,7 @@ IOStatus KGrGameIO::fetchGameListData
g->nLevels = fields.at (0).toInt();
g->rules = fields.at (1).at (0);
g->prefix = fields.at (2);
// kDebug() << "Levels:" << g->nLevels << "Rules:" << g->rules <<
// //qDebug() << "Levels:" << g->nLevels << "Rules:" << g->rules <<
// "Prefix:" << g->prefix;
if (kgr3Format) {
......@@ -117,7 +117,7 @@ IOStatus KGrGameIO::fetchGameListData
gameName = removeNewline (textLine.right (textLine.size() - n));
g->name = i18n (gameName.constData());
}
// kDebug() << "Skill:" << g->skill << "Name:" << g->name;
// //qDebug() << "Skill:" << g->skill << "Name:" << g->name;
// Loop to accumulate lines of about-data. If kgr3Format, exit on
// EOF or 'L' line. If not kgr3Format, exit on EOF or numeric line.
......@@ -132,7 +132,7 @@ IOStatus KGrGameIO::fetchGameListData
g->about.append (textLine);
}
g->about = removeNewline (g->about); // Remove final '\n'.
// kDebug() << "Info about: [" + g->about + "]";
// //qDebug() << "Info about: [" + g->about + "]";
if ((! kgr3Format) && (c != '\0')) {
filePath = dir + filename;
......@@ -152,7 +152,7 @@ bool KGrGameIO::readLevelData (const QString & dir,
const QString & prefix,
const int levelNo, KGrLevelData & d)
{
kDebug() << "dir" << dir << "Level" << prefix << levelNo;
//qDebug() << "dir" << dir << "Level" << prefix << levelNo;
QString filePath;
IOStatus stat = fetchLevelData
(dir, prefix, levelNo, d, filePath);
......@@ -190,7 +190,7 @@ IOStatus KGrGameIO::fetchLevelData
d.name = ""; // Level name (optional).
d.hint = ""; // Level hint (optional).
// kDebug()<< "LEVEL PATH:" << filePath;
// //qDebug()<< "LEVEL PATH:" << filePath;
openFile.setFileName (filePath);
// Check that the level-file exists.
......@@ -240,9 +240,9 @@ IOStatus KGrGameIO::fetchLevelData
}
}
// kDebug() << "Level:" << level << "Layout length:" << d.layout.size();
// kDebug() << "Name:" << "[" + d.name + "]";
// kDebug() << "Hint:" << "[" + d.hint + "]";
// //qDebug() << "Level:" << level << "Layout length:" << d.layout.size();
// //qDebug() << "Name:" << "[" + d.name + "]";
// //qDebug() << "Hint:" << "[" + d.hint + "]";
openFile.close();
return (result);
......@@ -284,7 +284,7 @@ char KGrGameIO::getALine (const bool kgr3, QByteArray & line)
}
}
// kDebug() << "Raw line:" << line;
// //qDebug() << "Raw line:" << line;
if (line.size() <= 0) {
// Return a '\0' byte if end-of-file.
return ('\0');
......@@ -293,7 +293,7 @@ char KGrGameIO::getALine (const bool kgr3, QByteArray & line)
// In KGr 3 format, strip off leading and trailing syntax.
if (line.startsWith ("// ")) {
line = line.right (line.size() - 3);
// kDebug() << "Stripped comment is:" << line;
// //qDebug() << "Stripped comment is:" << line;
}
else {
if (line.startsWith (" i18n(\"")) {
......@@ -314,7 +314,7 @@ char KGrGameIO::getALine (const bool kgr3, QByteArray & line)
else if (line.endsWith ("\"\n")) {
line = line.left (line.size() - 2);
}
// kDebug() << "Stripped syntax is:" << line;
// //qDebug() << "Stripped syntax is:" << line;
}
// In Kgr 3 format, return the first byte if not end-of-file.
c = line.at (0);
......@@ -377,4 +377,4 @@ bool KGrGameIO::safeRename (QWidget * theView, const QString & oldName,
return true;
}
#include "kgrgameio.moc"
......@@ -205,4 +205,4 @@ void KGrLevelGrid::placeHiddenLadders()
hiddenLadders.clear();
}
#include "kgrlevelgrid.moc"
......@@ -31,7 +31,7 @@
#include "kgrlevelgrid.h"
#include "kgrrunner.h"
#include <KDebug>
#include <QDebug>
#include <KMessageBox> // TODO - Remove.
#include <KRandomSequence>
......@@ -71,7 +71,7 @@ KGrLevelPlayer::~KGrLevelPlayer()
{
qDeleteAll(dugBricks);
dugBricks.clear(); //TODO: necessary?
kDebug() << "LEVEL PLAYER BEING DELETED.";
//qDebug() << "LEVEL PLAYER BEING DELETED.";
playerCount--;
// TODO - Remove this debugging code.
......@@ -806,7 +806,7 @@ void KGrLevelPlayer::tick (bool missed, int scaledTime)
// Queued connection ensures KGrGame slot runs AFTER return from here.
emit endLevel (status);
kDebug() << "END OF LEVEL";
//qDebug() << "END OF LEVEL";
return;
}
......@@ -1158,7 +1158,7 @@ void KGrLevelPlayer::killHero()
record (1, ACTION_CODE + KILL_HERO);
emit endLevel (DEAD);
kDebug() << "END OF LEVEL";
//qDebug() << "END OF LEVEL";
}
}
......@@ -1287,4 +1287,4 @@ void KGrLevelPlayer::showEnemyState (int enemyId)
}
#include "kgrlevelplayer.moc"
......@@ -327,4 +327,4 @@ int KGrRenderer::countFrames (const int index)
return count;
}
#include "kgrrenderer.moc"
......@@ -685,4 +685,4 @@ Direction KGrScavengerRules::findBestWay (const int eI, const int eJ,
return RIGHT;
}
#include "kgrrulebook.moc"
......@@ -616,4 +616,4 @@ void KGrEnemy::showState()
gridX, gridY, currAnimation, interval, prevInCell);
}
#include "kgrrunner.moc"
......@@ -16,7 +16,7 @@
****************************************************************************/
#include <QDebug>
#include <kdebug.h>
#include <QDebug>
#include <KLocalizedString>
......@@ -420,7 +420,7 @@ void KGrScene::drawFrame()
m_topLeftY + (2 * m_tileSize) - (3 * w),
FIELDWIDTH * m_tileSize + 6 * w,
FIELDHEIGHT * m_tileSize + 6 * w);
kDebug() << "FRAME WIDTH" << w << "tile size" << m_tileSize << "rectangle" << m_frame->rect();
//qDebug() << "FRAME WIDTH" << w << "tile size" << m_tileSize << "rectangle" << m_frame->rect();
QPen pen = QPen (m_renderer->textColor());
pen.setWidth (w);
m_frame->setPen (pen);
......@@ -647,4 +647,4 @@ void KGrScene::setTextFont (QGraphicsSimpleTextItem * t, double fontFraction)
t->setFont (f);
}
#include "kgrscene.moc"
......@@ -731,4 +731,4 @@ void KGrThumbNail::paintEvent (QPaintEvent * /* event (unused) */)
p.drawRect (rect().left(), rect().top(), rect().right(), rect().bottom());
}
#include "kgrselector.moc"
......@@ -18,7 +18,7 @@
#include "kgrsounds.h"
#include <KDebug>
#include <QDebug>
KGrSounds::KGrSounds() :
QObject(),
......@@ -33,7 +33,7 @@ KGrSounds::~KGrSounds()
int KGrSounds::loadSound (const QString &fileName)
{
kDebug() << "Loading sound" << fileName;
//qDebug() << "Loading sound" << fileName;
sounds << (new KgSound (fileName));
startTime << 0;
return sounds.count() - 1;
......@@ -101,4 +101,4 @@ void KGrSounds::setVolume (int effect, qreal volume)
sounds[effect]->setVolume (volume);
}
#include "kgrsounds.moc"
......@@ -19,7 +19,7 @@
#include "kgrsprite.h"
#include "kgrrenderer.h"
#include <KDebug>
#include <QDebug>
KGrSprite::KGrSprite (KGameRenderer * renderer, QString & key,
const char type, const int tickTime)
......@@ -85,7 +85,7 @@ void KGrSprite::setAnimation (bool repeating, int x, int y, int startFrame,
m_dy = (double) dy / m_ticks;
m_frameTicks = (double) m_ticks / nFrameChanges;
m_frameChange = 0.0;
// kDebug() << "m_ticks" << m_ticks << "dx,dy,dt" << dx << dy << dt << "m_dx,m_dy" << m_dx << m_dy << "m_frameTicks" << m_frameTicks << "nFrames" << nFrames << "nFrameChanges" << nFrameChanges;
// //qDebug() << "m_ticks" << m_ticks << "dx,dy,dt" << dx << dy << dt << "m_dx,m_dy" << m_dx << m_dy << "m_frameTicks" << m_frameTicks << "nFrames" << nFrames << "nFrameChanges" << nFrameChanges;
}
void KGrSprite::animate (bool missed)
......@@ -100,7 +100,7 @@ void KGrSprite::animate (bool missed)
return;
}
}
// kDebug() << missed << m_frameCtr << "=" << m_x << m_y << "frame" << m_startFrame + m_frameCtr << m_frameChange;
// //qDebug() << missed << m_frameCtr << "=" << m_x << m_y << "frame" << m_startFrame + m_frameCtr << m_frameChange;
// If the clock is running slow, skip an animation step.
if (! missed) {
......
......@@ -76,4 +76,4 @@ bool KGrSetTheme::readFromDesktopFile(const QString& path)
return true;
}
#include "kgrthemetypes.moc"
......@@ -17,7 +17,7 @@
#include "kgrtimer.h"
#include <KDebug>
#include <QDebug>
KGrTimer::KGrTimer (QObject * parent, int pTickTime, float pScale)
:
......@@ -75,4 +75,4 @@ void KGrTimer::internalSlot()
}
}
#include "kgrtimer.moc"
......@@ -57,4 +57,4 @@ void KGrView::mouseReleaseEvent (QMouseEvent * mouseEvent)
emit mouseLetGo (mouseEvent->button());
}
#include "kgrview.moc"
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