This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[Kourse 3] Fixing krazy2 issues

Tags: None
(comma "," separated)
Pconfig
Alumni
Posts
74
Karma
0
OS

RE: [Kourse 3] Fixing krazy2 issues

Tue Jan 13, 2009 2:11 pm
I'm currently working on kdeaccesibilty as this is the first of the alphabet :-P

[b]kmag[/b]
[code=diff]
Index: kmag.cpp
===================================================================
--- kmag.cpp (revision 910110)
+++ kmag.cpp (working copy)
@@ -91,7 +91,7 @@
fpsArray.push_back(15); // high
fpsArray.push_back(25); // very high

- colorArrayString setWhatsThis(i18n("Select the refresh rate. The higher the rate, the more computing power (CPU) will be needed."));
m_pFPSBox->setToolTip(i18n("Refresh rate"));

- m_pColorBox = new KSelectAction(i18n("&Color"),this);
+ m_pColorBox = new KSelectAction(i18nc("Color of the view", "&Color"),this);
actionCollection()->addAction("color_mode", m_pColorBox);
m_pColorBox->setItems(colorArrayString);
m_pColorBox->setWhatsThis(i18n("Select a mode to simulate various types of color-blindness."));
@@ -664,7 +664,7 @@
refreshSwitch->setToolTip(i18n("Click to stop window update"));
} else {
refreshSwitch->setIcon(KIcon("reload.png"));
- refreshSwitch->setText(i18n("Start"));
+ refreshSwitch->setText(i18nc("Start updating the window", "Start"));
refreshSwitch->setToolTip(i18n("Click to start window update"));
}
}
Index: kmagzoomview.h
===================================================================
--- kmagzoomview.h (revision 910110)
+++ kmagzoomview.h (working copy)
@@ -14,12 +14,13 @@
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; version 2 of the License *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
* *
***************************************************************************/

-#ifndef KMagZoomView_h_
-#define KMagZoomView_h_
+#ifndef KMagZoomView_h
+#define KMagZoomView_h

// include files for Qt
#include
@@ -241,4 +242,4 @@
bool m_fitToWindow;
};

-#endif // KMagZoomView_h_
+#endif // KMagZoomView_h
[/code]

[i]All issues fixed[/i]

[b]kmousetool[/b]

[code=diff]
Index: kmousetool/kmousetool.cpp
===================================================================
--- kmousetool/kmousetool.cpp (revision 910110)
+++ kmousetool/kmousetool.cpp (working copy)
@@ -493,7 +493,7 @@
if (mousetool_is_running)
buttonStartStop->setText(i18n("&Stop"));
else
- buttonStartStop->setText(i18n("&Start"));
+ buttonStartStop->setText(i18nc("Start tracking the mouse", "&Start"));
trayIcon->updateStartStopText(mousetool_is_running);
}

@@ -620,7 +620,7 @@
{
setObjectName(name);

- startStopAct = contextMenu()->addAction (i18n("&Start"), this, SIGNAL(startStopSelected()));
+ startStopAct = contextMenu()->addAction (i18nc("Start tracking the mouse", "&Start"), this, SIGNAL(startStopSelected()));
contextMenu()->addSeparator();
QAction* act;
act = contextMenu()->addAction (i18n("&Configure KMouseTool..."), this, SIGNAL(configureSelected()));
@@ -644,7 +644,7 @@
icon = KIconLoader::global()->loadIcon("kmousetool_on", KIconLoader::Small);
}
else {
- startStopAct->setText(i18n("&Start"));
+ startStopAct->setText(i18nc("Start tracking the mouse", "&Start"));
icon = KIconLoader::global()->loadIcon("kmousetool_off", KIconLoader::Small);
}
setIcon (icon);
Index: kmousetool/mtstroke.cpp
===================================================================
--- kmousetool/mtstroke.cpp (revision 910110)
+++ kmousetool/mtstroke.cpp (working copy)
@@ -79,7 +79,7 @@
bool MTStroke::pointsContain(Pt pt)
{
std::vector::iterator pos;
- for (pos=points.begin(); posx && pt.y==pos->y)
return true;
}
@@ -133,7 +133,7 @@
int scale = (int) delta/2;

std::vector::iterator pos;
- for (pos=points.begin(); pos::iterator pos;
- for (pos=points.begin(); pos pos->x)
stroke_minx = pos->x;
if (stroke_maxx x)
Index: kmousetool/version.h
===================================================================
--- kmousetool/version.h (revision 910110)
+++ kmousetool/version.h (working copy)
@@ -1,8 +1,27 @@
-// KMouseTool Version Information
-//
+/***************************************************************************
+ version.h - KMouseTool Version Information
+ -------------------
+ begin : Sun Jan 20 23:27:58 PST 2002
+ copyright : (C) 2002-2003 by Jeff Roush
+ email : jeff@mousetool.com
+ copyright : (C) 2003 by Olaf Schmidt
+ email : ojschmidt@kde.org
+ copyright : (C) 2003 by Gunnar Schmi Dt
+ email : gunnar@schmi-dt.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or 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) any later version. *
+ * *
+ ***************************************************************************/
+
#ifndef kmousetool_version_h
#define kmousetool_version_h

#define KMOUSETOOL_VERSION "1.12"

-#endif /*version_h*/
+#endif /*kmousetool_version_h*/
[/code]

[i]Issues that still need fixing
[list]
[*]Can't find the author of Xmd_kmousetool.h
[*]Don't know how to fix cmake issue: O/S or Compiler specific macro line#61[__sgi] (1)
C++ source files and non-installed headers should NOT use cpp
conditionals that check for a certain O/S or compiler; instead use
CMake HAVE_foo macros. We want to check for features discovered
during CMake time rather than for a specific O/S.
[/list]
[/i]

[b]kmouth[/b]
[code=diff]
Index: kmouth.cpp
===================================================================
--- kmouth.cpp (revision 910110)
+++ kmouth.cpp (working copy)
@@ -151,7 +151,7 @@

editSpeak = actionCollection()->addAction("edit_speak");
editSpeak->setIcon(KIcon("speak"));
- editSpeak->setText(i18n("&Speak"));
+ editSpeak->setText(i18nc("Start speaking", "&Speak"));
connect(editSpeak, SIGNAL(triggered(bool)), phraseList, SLOT(speak()));
editSpeak->setToolTip(i18n("Speaks the currently active sentence(s)"));
editSpeak->setWhatsThis (i18n("Speaks the currently active sentence(s). If there is some text in the edit field it is spoken. Otherwise the selected sentences in the history (if any) are spoken."));
@@ -241,7 +241,7 @@
///////////////////////////////////////////////////////////////////
// STATUSBAR
// TODO: add your own items you need for displaying current application status.
- statusBar()->insertItem(i18n("Ready."), ID_STATUS_MSG);
+ statusBar()->insertItem(i18nc("The job is done", "Ready."), ID_STATUS_MSG);
}

void KMouthApp::initPhraseList()
@@ -259,7 +259,7 @@
slotStatusMsg(i18n("Opening file..."));

phraseList->open (url);
- slotStatusMsg(i18n("Ready."));
+ slotStatusMsg(i18nc("The job is done", "Ready."));
}

void KMouthApp::saveOptions() {
@@ -368,7 +368,7 @@

phraseList->open();

- slotStatusMsg(i18n("Ready."));
+ slotStatusMsg(i18nc("The job is done", "Ready."));
}

void KMouthApp::slotFileSaveAs() {
@@ -376,7 +376,7 @@

phraseList->save();

- slotStatusMsg(i18n("Ready."));
+ slotStatusMsg(i18nc("The job is done", "Ready."));
}

void KMouthApp::slotFilePrint()
@@ -394,12 +394,12 @@
phraseList->print(printer);
}

- slotStatusMsg(i18n("Ready."));
+ slotStatusMsg(i18nc("The job is done", "Ready."));
}

void KMouthApp::slotFileQuit()
{
- slotStatusMsg(i18n("Exiting..."));
+ slotStatusMsg(i18nc("Shutting down the application", "Exiting..."));
saveOptions();
// close the first window, the list makes the next one the first again.
// This ensures that queryClose() is called on each window to ask for closing
@@ -444,7 +444,7 @@
else
menuBar()->show();

- slotStatusMsg(i18n("Ready."));
+ slotStatusMsg(i18nc("The job is done", "Ready."));
}

void KMouthApp::slotViewToolBar()
@@ -461,7 +461,7 @@
toolBar("mainToolBar")->show();
}

- slotStatusMsg(i18n("Ready."));
+ slotStatusMsg(i18nc("The job is done", "Ready."));
}

void KMouthApp::slotViewPhrasebookBar()
@@ -478,7 +478,7 @@
toolBar("phrasebookBar")->show();
}

- slotStatusMsg(i18n("Ready."));
+ slotStatusMsg(i18nc("The job is done", "Ready."));
}

void KMouthApp::slotViewStatusBar()
@@ -495,7 +495,7 @@
statusBar()->show();
}

- slotStatusMsg(i18n("Ready."));
+ slotStatusMsg(i18nc("The job is done", "Ready."));
}

void KMouthApp::slotConfigureTTS() {
Index: texttospeechconfigurationwidget.cpp
===================================================================
--- texttospeechconfigurationwidget.cpp (revision 910110)
+++ texttospeechconfigurationwidget.cpp (working copy)
@@ -45,10 +45,10 @@
}

void TextToSpeechConfigurationWidget::buildCodecList () {
- QString local = i18n("Local")+" (";
+ QString local = i18nc("Local characterset", "Local")+" (";
local += QTextCodec::codecForLocale()->name() + ')';
characterCodingBox->addItem (local, Speech::Local);
- characterCodingBox->addItem (i18n("Latin1"), Speech::Latin1);
+ characterCodingBox->addItem (i18nc("Latin1 characterset", "Latin1"), Speech::Latin1);
characterCodingBox->addItem (i18n("Unicode"), Speech::Unicode);
for (int i = 0; i codecList->count(); i++ )
characterCodingBox->addItem (ttsSystem->codecList->at(i)->name(), Speech::UseCodec + i);
Index: optionsdialog.cpp
===================================================================
--- optionsdialog.cpp (revision 910110)
+++ optionsdialog.cpp (working copy)
@@ -24,11 +24,11 @@
#include
#include
#include
-#include
#include
#include

#include
+#include
#include
#include
#include
@@ -125,7 +125,7 @@

//addGridPage (1, Qt::Horizontal, i18n("General Options"), QString(), iconGeneral);

- tabCtl = new QTabWidget();
+ tabCtl = new KTabWidget();
tabCtl->setObjectName("general");

behaviourWidget = new PreferencesWidget (tabCtl, "prefPage");
Index: phraselist.h
===================================================================
--- phraselist.h (revision 910110)
+++ phraselist.h (working copy)
@@ -44,7 +44,7 @@
class PhraseList : public QWidget {
Q_OBJECT
public:
- PhraseList(QWidget *parent=0, const char *name=0);
+ explicit PhraseList(QWidget *parent=0, const char *name=0);
~PhraseList();

/** contains the implementation for printing functionality */
Index: books/nl.desktop
===================================================================
--- books/nl.desktop (revision 910110)
+++ books/nl.desktop (working copy)
@@ -1,6 +1,8 @@
# KDE Config File
[Desktop Entry]
Name=Dutch
+Type=Link
+
Name[ar]=هولندي
Name[be]=Галандская
Name[bg]=Холандски
Index: books/de.desktop
===================================================================
--- books/de.desktop (revision 910110)
+++ books/de.desktop (working copy)
@@ -1,5 +1,7 @@
[Desktop Entry]
Name=German
+Type=Link
+
Name[ar]=ألماني
Name[be]=Нямецкая
Name[bg]=Немски
Index: books/sv.desktop
===================================================================
--- books/sv.desktop (revision 910110)
+++ books/sv.desktop (working copy)
@@ -1,6 +1,8 @@
# KDE Config File
[Desktop Entry]
Name=Swedish
+Type=Link
+
Name[ar]=سويدي
Name[be]=Шведская
Name[bg]=Шведски
Index: books/en.desktop
===================================================================
--- books/en.desktop (revision 910110)
+++ books/en.desktop (working copy)
@@ -1,6 +1,8 @@
# KDE Config File
[Desktop Entry]
Name=English
+Type=Link
+
Name[ar]=إنجليزي
Name[be]=Англійская
Name[bg]=Английски
Index: phrasebook/phrasebookparser.h
===================================================================
--- phrasebook/phrasebookparser.h (revision 910110)
+++ phrasebook/phrasebookparser.h (working copy)
@@ -18,8 +18,9 @@
#ifndef PHRASEBOOKPARSER_H
#define PHRASEBOOKPARSER_H

-#include
#include
+#include
+#include

#include "phrasebook.h"

Index: phrasebook/phrasebook.h
===================================================================
--- phrasebook/phrasebook.h (revision 910110)
+++ phrasebook/phrasebook.h (working copy)
@@ -20,10 +20,10 @@

#include
#include
-#include
#include
#include
#include
+#include

#include
#include
@@ -62,7 +62,7 @@
class PhraseBookEntry {
public:
PhraseBookEntry ();
- PhraseBookEntry (Phrase phrase, int level = 1, bool isPhrase = true);
+ explicit PhraseBookEntry (Phrase phrase, int level = 1, bool isPhrase = true);
~PhraseBookEntry () {}

void setPhrase (Phrase phrase, int level = 1, bool isPhrase = true);
@@ -154,8 +154,8 @@
class PhraseBookDrag: public Q3DragObject {
Q_OBJECT
public:
- PhraseBookDrag (PhraseBook *book, QWidget *dragSource = 0, const char *name = 0);
- PhraseBookDrag (QWidget *dragSource = 0, const char *name = 0);
+ explicit PhraseBookDrag (PhraseBook *book, QWidget *dragSource = 0, const char *name = 0);
+ explicit PhraseBookDrag (QWidget *dragSource = 0, const char *name = 0);
~PhraseBookDrag ();

virtual void setBook (PhraseBook *book);
Index: phrasebook/phrasebookdialog.h
===================================================================
--- phrasebook/phrasebookdialog.h (revision 910110)
+++ phrasebook/phrasebookdialog.h (working copy)
@@ -131,7 +131,7 @@
*/
class ButtonBoxWidget : public QWidget, public Ui::ButtonBoxUI {
public:
- ButtonBoxWidget (QWidget *parent = 0, const char *name = 0);
+ explicit ButtonBoxWidget (QWidget *parent = 0, const char *name = 0);
~ButtonBoxWidget ();

KKeySequenceWidget *keyButton;
Index: phrasebook/phrasetree.h
===================================================================
--- phrasebook/phrasetree.h (revision 910110)
+++ phrasebook/phrasetree.h (working copy)
@@ -64,7 +64,7 @@
friend class PhraseTreeItem;
Q_OBJECT
public:
- PhraseTree (QWidget *parent = 0, const char *name = 0);
+ explicit PhraseTree (QWidget *parent = 0, const char *name = 0);
~PhraseTree ();

void keyPressEvent (QKeyEvent *e);
Index: phrasebook/phrasebook.cpp
===================================================================
--- phrasebook/phrasebook.cpp (revision 910110)
+++ phrasebook/phrasebook.cpp (working copy)
@@ -20,11 +20,12 @@

#include
#include
-#include
#include
#include
#include
#include
+#include
+#include

#include
#include
Index: phrasebook/phrasebookdialog.cpp
===================================================================
--- phrasebook/phrasebookdialog.cpp (revision 910110)
+++ phrasebook/phrasebookdialog.cpp (working copy)
@@ -181,12 +181,12 @@
Q3ListViewItem *parent = 0;
Q3ListViewItem *last = 0;
QStringList currentNamePath;
- currentNamePath stack;
StandardBookList::iterator it;
for (it = bookPaths.begin(); it != bookPaths.end(); ++it) {
QString namePath = (*it).path;
- QStringList dirs = namePath.split( "/");
+ QStringList dirs = namePath.split( '/');

QStringList::iterator it1=currentNamePath.begin();
QStringList::iterator it2=dirs.begin();
@@ -490,7 +490,7 @@
url.setPath((*it).filename);

QString namePath = "x/"+(*it).path;
- QStringList dirs = namePath.split( "/");
+ QStringList dirs = namePath.split( '/');

QStringList::iterator it1=currentNamePath.begin();
QStringList::iterator it2=dirs.begin();
Index: kmouth.h
===================================================================
--- kmouth.h (revision 910110)
+++ kmouth.h (working copy)
@@ -56,7 +56,7 @@
public:
/** construtor of KMouthApp, calls all init functions to create the application.
*/
- KMouthApp(QWidget* parent=0, const char* name=0);
+ explicit KMouthApp(QWidget* parent=0, const char* name=0);
~KMouthApp();
/** Returns true if the configuration wizard was not needed or when it
* was successfully completed.
Index: phraselist.cpp
===================================================================
--- phraselist.cpp (revision 910110)
+++ phraselist.cpp (working copy)
@@ -459,7 +459,7 @@
i18n("*|All Filesn*.phrasebook|Phrase Books (*.phrasebook)n*.txt|Plain Text Files (*.txt)"), this, i18n("Open File as History"));

if(!url.isEmpty())
- open (url);
+ this->open (url);
}

void PhraseList::open (KUrl url) {
Index: optionsdialog.h
===================================================================
--- optionsdialog.h (revision 910110)
+++ optionsdialog.h (working copy)
@@ -27,7 +27,7 @@
#include "ui_preferencesui.h"
#include "texttospeechconfigurationwidget.h"

-class QTabWidget;
+class KTabWidget;
class KCModule;
class WordCompletionWidget;

@@ -80,7 +80,7 @@
void slotApply();

private:
- QTabWidget *tabCtl;
+ KTabWidget *tabCtl;
TextToSpeechConfigurationWidget *commandWidget;
PreferencesWidget *behaviourWidget;
KCModule *kttsd;
Index: wordcompletion/dictionarycreationwizard.h
===================================================================
--- wordcompletion/dictionarycreationwizard.h (revision 910110)
+++ wordcompletion/dictionarycreationwizard.h (working copy)
@@ -23,8 +23,10 @@
#include
#include
#include
+#include

#include
+#include
#include

#include "ui_creationsourceui.h"
@@ -33,7 +35,7 @@

class CompletionWizardWidget;
class QTextCodec;
-class QComboBox;
+class KComboBox;
class MergeWidget;

class CreationSourceDetailsWidget : public QWidget, public Ui::CreationSourceDetailsUI {
@@ -93,7 +95,7 @@

private:
void buildCodecList ();
- void buildCodecCombo (QComboBox *combo);
+ void buildCodecCombo (KComboBox *combo);

CreationSourceWidget *creationSource;
CreationSourceDetailsWidget *fileWidget;
Index: wordcompletion/wordcompletion.cpp
===================================================================
--- wordcompletion/wordcompletion.cpp (revision 910110)
+++ wordcompletion/wordcompletion.cpp (working copy)
@@ -1,4 +1,20 @@
+/***************************************************************************
+ wordcompletion.cpp - description
+ -------------------
+ begin : Tue Apr 29 2003
+ copyright : (C) 2002 by Gunnar Schmi Dt
+ email : kmouth@schmi-dt.de
+ ***************************************************************************/

+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or 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) any later version. *
+ * *
+ ***************************************************************************/
+
#include "wordcompletion.h"

#include
@@ -118,7 +134,7 @@
KConfig *config = new KConfig("kmouthrc");
const QStringList groups = config->groupList();
for (QStringList::const_iterator it = groups.constBegin(); it != groups.constEnd(); ++it)
- if ((*it).startsWith ("Dictionary ")) {
+ if ((*it).startsWith (QString("Dictionary "))) {
KConfigGroup cg(config, *it);
WordCompletionPrivate::DictionaryDetails details;
details.filename = cg.readEntry("Filename");
@@ -161,7 +177,7 @@
while (!stream.atEnd()) {
QString s = stream.readLine();
if (!(s.isNull() || s.isEmpty())) {
- QStringList list = s.split( "t");
+ QStringList list = s.split( 't');
bool ok;
int weight = list[1].toInt(&ok);
if (ok && (weight > 0))
Index: wordcompletion/wordlist.cpp
===================================================================
--- wordcompletion/wordlist.cpp (revision 910110)
+++ wordcompletion/wordlist.cpp (working copy)
@@ -22,6 +22,10 @@
#include
#include
#include
+#include
+#include
+#include
+#include

#include
#include
@@ -183,7 +187,7 @@
while (!stream.atEnd()) {
QString s = stream.readLine();
if (!(s.isNull() || s.isEmpty())) {
- QStringList list = s.split( "t");
+ QStringList list = s.split( 't');
bool ok;
int weight = list[1].toInt(&ok);
if (ok && (weight > 0)) {
@@ -401,14 +405,14 @@
}
}

- if (s.startsWith("PFX")) {
+ if (s.startsWith(QString("PFX"))) {
AffList list;
if (prefixes.contains (fields[1][0]))
list = prefixes[fields[1][0]];
list groupList();
DictionaryListItem *last = 0;
for (QStringList::const_iterator it = groups.constBegin(); it != groups.constEnd(); ++it)
- if ((*it).startsWith ("Dictionary ")) {
+ if ((*it).startsWith (QString("Dictionary "))) {
KConfigGroup cg (config, *it);
QString languageTag = cg.readEntry("Language");
last = new DictionaryListItem (dictionaryList, last,
@@ -157,7 +157,7 @@
void WordCompletionWidget::save() {
const QStringList groups = config->groupList();
for (QStringList::const_iterator it = groups.constBegin(); it != groups.constEnd(); ++it)
- if ((*it).startsWith ("Dictionary "))
+ if ((*it).startsWith (QString("Dictionary ")))
config->deleteGroup (*it);

int number = 0;
Index: wordcompletion/wordcompletion.h
===================================================================
--- wordcompletion/wordcompletion.h (revision 910110)
+++ wordcompletion/wordcompletion.h (working copy)
@@ -1,3 +1,20 @@
+/***************************************************************************
+ wordcompletionwidget.cpp - description
+ -------------------
+ begin : Tue Apr 29 2003
+ copyright : (C) 2002 by Gunnar Schmi Dt
+ email : kmouth@schmi-dt.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or 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) any later version. *
+ * *
+ ***************************************************************************/
+
#ifndef WORDCOMPLETION_H
#define WORDCOMPLETION_H

Index: wordcompletion/dictionarycreationwizard.cpp
===================================================================
--- wordcompletion/dictionarycreationwizard.cpp (revision 910110)
+++ wordcompletion/dictionarycreationwizard.cpp (working copy)
@@ -15,15 +15,17 @@
* *
***************************************************************************/

+#include "dictionarycreationwizard.h"
+#include "wordlist.h"
+
#include
#include
#include
#include
#include
-#include
+#include
#include
#include
-#include

#include
#include
@@ -35,8 +37,6 @@
#include
#include
#include
-#include "dictionarycreationwizard.h"
-#include "wordlist.h"

DictionaryCreationWizard::DictionaryCreationWizard (QWidget *parent, const char *name,
const QStringList &dictionaryNames, const QStringList &dictionaryFiles,
@@ -56,7 +56,7 @@

dirWidget= new CreationSourceDetailsWidget (this, "directory source page");
addPage (dirWidget, i18n("Source of New Dictionary (2)"));
- dirWidget->urlLabel->setText (i18n("&Directory:"));
+ dirWidget->urlLabel->setText (i18nc("In which directory is the file located?", "&Directory:"));
dirWidget->urlLabel->setWhatsThis( i18n("With this input field you specify which directory you want to load for creating the new dictionary."));
dirWidget->url->setMode(KFile::Directory);
dirWidget->url->setWhatsThis( i18n("With this input field you specify which directory you want to load for creating the new dictionary."));
@@ -96,12 +96,13 @@
}
}

-void DictionaryCreationWizard::buildCodecCombo (QComboBox *combo) {
- QString local = i18n("Local")+" (";
+void DictionaryCreationWizard::buildCodecCombo (KComboBox *combo) {
+ QString local = i18nc("Local characterset", "Local")+" (";
local += QTextCodec::codecForLocale()->name() + ')';
combo->addItem (local, 0);
- combo->addItem (i18n("Latin1"), 1);
+ combo->addItem (i18nc("Latin characterset", "Latin1"), 1);
combo->addItem (i18n("Unicode"), 2);
+
for (int i = 0; i count(); i++ )
combo->addItem (codecList->at(i)->name(), i+3);
}
@@ -367,7 +368,7 @@
if (WordList::saveWordList (map, dictionaryFile)) {
KConfigGroup cg(config, "Dictionary 0");
cg.writeEntry ("Filename", "wordcompletion1.dict");
- cg.writeEntry ("Name", i18n("Default"));
+ cg.writeEntry ("Name", i18nc("Default dictionary", "Default"));
cg.writeEntry ("Language", language);
cg.sync();
}
Index: wordcompletion/wordlist.h
===================================================================
--- wordcompletion/wordlist.h (revision 910110)
+++ wordcompletion/wordlist.h (working copy)
@@ -20,7 +20,9 @@
#ifndef WORDLIST_H
#define WORDLIST_H

-#include
+#include
+#include
+#include
#include
#include
#include

[/code]

[i]Issues that still need fixing[/i]
[list]
[*]Icons, don't know what to do with them. Krazy says something about reporting them to team oxygen
[/list]

Issues that need a review
[list]
[*]The desktop files: Is it ok to make links of them?
[*]the this->open()
[/list]
[/i]

Last edited by Pconfig on Tue Jan 13, 2009 2:18 pm, edited 1 time in total.
User avatar
msoeken
Mentor
Posts
300
Karma
4
OS

RE: [Kourse 3] Fixing krazy2 issues

Tue Jan 13, 2009 6:45 pm
Great work! @Pconfig: I will have a look at your diffs tomorrow. Further I want to contact Allen to ask how to fix the cmake HAVE_foo issues. If I can understand it, I will write some notes on techbase.


Image
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size]
fengshaun
Alumni
Posts
32
Karma
0
OS

RE: [Kourse 3] Fixing krazy2 issues

Tue Jan 13, 2009 10:36 pm
oh wow, I didn't know the svn diff trick. My krazy2 is still finding mistakes after hours =S How much is it supposed to take?


A proud KDE user and Linux enthusiast.
fengshaun
Alumni
Posts
32
Karma
0
OS

RE: [Kourse 3] Fixing krazy2 issues

Wed Jan 14, 2009 2:05 am
solid/backends/fakehw/fakestorageaccess.h doesn't have any problems, which is weird. I see a proper include guard there, but EBN reports otherwise. So here is my patch for solid proper include problems (total = 8 problems)

Code: Select all
Index: solid/backends/hal/haldevice.cpp
===================================================================
--- solid/backends/hal/haldevice.cpp   (revision 910320)
+++ solid/backends/hal/haldevice.cpp   (working copy)
@@ -17,6 +17,8 @@
 
 */
 
+#include "haldevice.h"
+
 #include
 #include
 #include
@@ -26,7 +28,6 @@
 
 #include
 
-#include "haldevice.h"
 #include "haldeviceinterface.h"
 #include "halgenericinterface.h"
 #include "halprocessor.h"
Index: solid/backends/wmi/wmidevice.cpp
===================================================================
--- solid/backends/wmi/wmidevice.cpp   (revision 910320)
+++ solid/backends/wmi/wmidevice.cpp   (working copy)
@@ -17,11 +17,12 @@
 
 */
 
+#include "wmidevice.h"
+
 #include
 
 #include
 
-#include "wmidevice.h"
 #include "wmideviceinterface.h"
 #include "wmigenericinterface.h"
 #include "wmiprocessor.h"
Index: solid/backends/wmi/wmimanager.cpp
===================================================================
--- solid/backends/wmi/wmimanager.cpp   (revision 910320)
+++ solid/backends/wmi/wmimanager.cpp   (working copy)
@@ -17,9 +17,10 @@
 
 */
 
+#include "wmimanager.h"
+
 #include
 
-#include "wmimanager.h"
 #include "wmidevice.h"
 #include "wmideviceinterface.h"
 #include "wmiquery.h"
Index: examples/tutorial1/tutorial1.h
===================================================================
--- examples/tutorial1/tutorial1.h   (revision 910320)
+++ examples/tutorial1/tutorial1.h   (working copy)
@@ -16,3 +16,8 @@
     Boston, MA 02110-1301, USA.
 
 */
+
+#ifndef TUTORIAL1_H
+#define TUTORIAL1_H
+
+#endif
Index: examples/tutorial2/tutorial2.h
===================================================================
--- examples/tutorial2/tutorial2.h   (revision 910320)
+++ examples/tutorial2/tutorial2.h   (working copy)
@@ -17,3 +17,7 @@
 
 */
 
+#ifndef TUTORIAL2_H
+#define TUTORIAL2_H
+
+#endif // TUTORIAL2_H
Index: examples/tutorial3/tutorial3.h
===================================================================
--- examples/tutorial3/tutorial3.h   (revision 910320)
+++ examples/tutorial3/tutorial3.h   (working copy)
@@ -17,3 +17,7 @@
 
 */
 
+#ifndef TUTORIAL3_H
+#define TUTORIAL3_H
+
+#endif // TUTORIAL3_H
Index: examples/tutorial4/tutorial4.h
===================================================================
--- examples/tutorial4/tutorial4.h   (revision 910320)
+++ examples/tutorial4/tutorial4.h   (working copy)
@@ -17,3 +17,7 @@
 
 */
 
+#ifndef TUTORIAL4_H
+#define TUTORIAL4_H
+
+#endif // TUTORIAL4_h
Index: examples/tutorial5/tutorial5.h
===================================================================
--- examples/tutorial5/tutorial5.h   (revision 910320)
+++ examples/tutorial5/tutorial5.h   (working copy)
@@ -17,3 +17,7 @@
 
 */
 
+#ifndef TUTORIAL5_H
+#define TUTORIAL5_H
+
+#endif // TUTORIAL5_H
[hr]
And here is the patch for i18n problem (passing QString for startsWith() and endsWith())

Code: Select all
Index: solid/backends/hal/haldvbinterface.cpp
===================================================================
--- solid/backends/hal/haldvbinterface.cpp   (revision 910320)
+++ solid/backends/hal/haldvbinterface.cpp   (working copy)
@@ -52,7 +52,7 @@
         return -1;
     string = string.mid(pos + 1);
 
-    if (!string.startsWith("adapter"))
+    if (!string.startsWith(QString("adapter")))
         return -1;
     string = string.mid(7);
 
@@ -94,31 +94,31 @@
         return false;
     string = string.mid(pos + 1);
 
-    if (string.startsWith("audio")) {
+    if (string.startsWith(QString("audio"))) {
         *type = Solid::DvbInterface::DvbAudio;
         string = string.mid(5);
-    } else if (string.startsWith("ca")) {
+    } else if (string.startsWith(QString("ca"))) {
         *type = Solid::DvbInterface::DvbCa;
         string = string.mid(2);
-    } else if (string.startsWith("demux")) {
+    } else if (string.startsWith(QString("demux"))) {
         *type = Solid::DvbInterface::DvbDemux;
         string = string.mid(5);
-    } else if (string.startsWith("dvr")) {
+    } else if (string.startsWith(QString("dvr"))) {
         *type = Solid::DvbInterface::DvbDvr;
         string = string.mid(3);
-    } else if (string.startsWith("frontend")) {
+    } else if (string.startsWith(QString("frontend"))) {
         *type = Solid::DvbInterface::DvbFrontend;
         string = string.mid(8);
-    } else if (string.startsWith("net")) {
+    } else if (string.startsWith(QString("net"))) {
         *type = Solid::DvbInterface::DvbNet;
         string = string.mid(3);
-    } else if (string.startsWith("osd")) {
+    } else if (string.startsWith(QString("osd"))) {
         *type = Solid::DvbInterface::DvbOsd;
         string = string.mid(3);
-    } else if (string.startsWith("sec")) {
+    } else if (string.startsWith(QString("sec"))) {
         *type = Solid::DvbInterface::DvbSec;
         string = string.mid(3);
-    } else if (string.startsWith("video")) {
+    } else if (string.startsWith(QString("video"))) {
         *type = Solid::DvbInterface::DvbVideo;
         string = string.mid(5);
     } else
Index: solid/backends/hal/halvolume.cpp
===================================================================
--- solid/backends/hal/halvolume.cpp   (revision 910320)
+++ solid/backends/hal/halvolume.cpp   (working copy)
@@ -51,8 +51,8 @@
     bool hotpluggable = drive.property("storage.hotpluggable").toBool();
 
     return !removable && !hotpluggable
-        && mounted && !mount_point.startsWith("/media/")
-        && !mount_point.startsWith("/mnt/");
+        && mounted && !mount_point.startsWith(QString("/media/"))
+        && !mount_point.startsWith(QString("/mnt/"));
 }
 
 Solid::StorageVolume::UsageType Volume::usage() const
Index: solid/backends/wmi/wmidvbinterface.cpp
===================================================================
--- solid/backends/wmi/wmidvbinterface.cpp   (revision 910320)
+++ solid/backends/wmi/wmidvbinterface.cpp   (working copy)
@@ -52,7 +52,7 @@
         return -1;
     string = string.mid(pos + 1);
 
-    if (!string.startsWith("adapter"))
+    if (!string.startsWith(QString("adapter")))
         return -1;
     string = string.mid(7);
 
@@ -94,31 +94,31 @@
         return false;
     string = string.mid(pos + 1);
 
-    if (string.startsWith("audio")) {
+    if (string.startsWith(QString("audio"))) {
         *type = Solid::DvbInterface::DvbAudio;
         string = string.mid(5);
-    } else if (string.startsWith("ca")) {
+    } else if (string.startsWith(QString("ca"))) {
         *type = Solid::DvbInterface::DvbCa;
         string = string.mid(2);
-    } else if (string.startsWith("demux")) {
+    } else if (string.startsWith(QString("demux"))) {
         *type = Solid::DvbInterface::DvbDemux;
         string = string.mid(5);
-    } else if (string.startsWith("dvr")) {
+    } else if (string.startsWith(QString("dvr"))) {
         *type = Solid::DvbInterface::DvbDvr;
         string = string.mid(3);
-    } else if (string.startsWith("frontend")) {
+    } else if (string.startsWith(QString("frontend"))) {
         *type = Solid::DvbInterface::DvbFrontend;
         string = string.mid(8);
-    } else if (string.startsWith("net")) {
+    } else if (string.startsWith(QString("net"))) {
         *type = Solid::DvbInterface::DvbNet;
         string = string.mid(3);
-    } else if (string.startsWith("osd")) {
+    } else if (string.startsWith(QString("osd"))) {
         *type = Solid::DvbInterface::DvbOsd;
         string = string.mid(3);
-    } else if (string.startsWith("sec")) {
+    } else if (string.startsWith(QString("sec"))) {
         *type = Solid::DvbInterface::DvbSec;
         string = string.mid(3);
-    } else if (string.startsWith("video")) {
+    } else if (string.startsWith(QString("video"))) {
         *type = Solid::DvbInterface::DvbVideo;
         string = string.mid(5);
     } else
Index: solid/backends/wmi/wmivolume.cpp
===================================================================
--- solid/backends/wmi/wmivolume.cpp   (revision 910320)
+++ solid/backends/wmi/wmivolume.cpp   (working copy)
@@ -51,8 +51,8 @@
 
 
     return !removable && !hotpluggable
-        && mounted && !mount_point.startsWith("/media/")
-        && !mount_point.startsWith("/mnt/");
+        && mounted && !mount_point.startsWith(QString("/media/"))
+        && !mount_point.startsWith(QString("/mnt/"));
 }
 
 Solid::StorageVolume::UsageType Volume::usage() const
[hr]
And a question, what should I do with http://lxr.kde.org/source/KDE/kdelibs/s ... nterface.h at line 94? Should I simply make in not-inline and move the implementation to the .cpp file?

Last edited by fengshaun on Wed Jan 14, 2009 2:32 am, edited 1 time in total.


A proud KDE user and Linux enthusiast.
Pconfig
Alumni
Posts
74
Karma
0
OS

RE: [Kourse 3] Fixing krazy2 issues

Wed Jan 14, 2009 8:26 am
fengshaun wrote:solid/backends/fakehw/fakestorageaccess.h doesn't have any problems, which is weird. I see a proper include guard there, but EBN reports otherwise. So here is my patch for solid proper include problems (total = 8 problems)


By the way, when you start placing headers on top, make sure all files still compile. I had some issues with that. The header file missed some libraries or something..
User avatar
msoeken
Mentor
Posts
300
Karma
4
OS

RE: [Kourse 3] Fixing krazy2 issues

Wed Jan 14, 2009 10:54 am
pklaffert wrote:some license and copyright issues left and these issues with explicit constructor.


You just have to write explicit before the constructor.

pklaffert wrote:i am not able to compile and test the changes since my workstation has not enough memory left to install the whole trunk version of kde

hope the changes are right anyway
Code: Select all
-            wildcards.replace( "*", "" );
+            wildcards.replace( '*', '' );



This gives an compile error because an empty char constant is not valid. You have to change it to
Code: Select all
wildcards.replace( '*', "" );


You could send this patch to the mailing list.[hr]
Pconfig wrote:Issues that still need fixing
  • Icons, don't know what to do with them. Krazy says something about reporting them to team oxygen


You should ignore this, because I saw there is for example KIcon("phrase") where phrase is an icon installed by the application. krazy cannot know that. You can suppress it with krazy comments

Pconfig wrote:Issues that need a review
  • The desktop files: Is it ok to make links of them?
  • the this->open()
[/i]


I do not know what you mean by making links of the desktop files.

this->open() should be fine. Does krazy complain about it?[hr]
fengshaun wrote:oh wow, I didn't know the svn diff trick. My krazy2 is still finding mistakes after hours =S How much is it supposed to take?


You are using krazy2 locally, aren't you? Perhaps you should start it in a subdirectory and not over all directories.[hr]
fengshaun wrote:solid/backends/fakehw/fakestorageaccess.h doesn't have any problems, which is weird. I see a proper include guard there, but EBN reports otherwise. So here is my patch for solid proper include problems (total = 8 problems)

Code: Select all
Index: solid/backends/hal/haldevice.cpp
===================================================================
--- solid/backends/hal/haldevice.cpp   (revision 910320)
+++ solid/backends/hal/haldevice.cpp   (working copy)
@@ -17,6 +17,8 @@
 
 */
 
+#include "haldevice.h"
+
 #include
 #include
 #include
@@ -26,7 +28,6 @@
 
 #include
 
-#include "haldevice.h"
 #include "haldeviceinterface.h"
 #include "halgenericinterface.h"
 #include "halprocessor.h"
Index: solid/backends/wmi/wmidevice.cpp
===================================================================
--- solid/backends/wmi/wmidevice.cpp   (revision 910320)
+++ solid/backends/wmi/wmidevice.cpp   (working copy)
@@ -17,11 +17,12 @@
 
 */
 
+#include "wmidevice.h"
+
 #include
 
 #include
 
-#include "wmidevice.h"
 #include "wmideviceinterface.h"
 #include "wmigenericinterface.h"
 #include "wmiprocessor.h"
Index: solid/backends/wmi/wmimanager.cpp
===================================================================
--- solid/backends/wmi/wmimanager.cpp   (revision 910320)
+++ solid/backends/wmi/wmimanager.cpp   (working copy)
@@ -17,9 +17,10 @@
 
 */
 
+#include "wmimanager.h"
+
 #include
 
-#include "wmimanager.h"
 #include "wmidevice.h"
 #include "wmideviceinterface.h"
 #include "wmiquery.h"
Index: examples/tutorial1/tutorial1.h
===================================================================
--- examples/tutorial1/tutorial1.h   (revision 910320)
+++ examples/tutorial1/tutorial1.h   (working copy)
@@ -16,3 +16,8 @@
     Boston, MA 02110-1301, USA.
 
 */
+
+#ifndef TUTORIAL1_H
+#define TUTORIAL1_H
+
+#endif
Index: examples/tutorial2/tutorial2.h
===================================================================
--- examples/tutorial2/tutorial2.h   (revision 910320)
+++ examples/tutorial2/tutorial2.h   (working copy)
@@ -17,3 +17,7 @@
 
 */
 
+#ifndef TUTORIAL2_H
+#define TUTORIAL2_H
+
+#endif // TUTORIAL2_H
Index: examples/tutorial3/tutorial3.h
===================================================================
--- examples/tutorial3/tutorial3.h   (revision 910320)
+++ examples/tutorial3/tutorial3.h   (working copy)
@@ -17,3 +17,7 @@
 
 */
 
+#ifndef TUTORIAL3_H
+#define TUTORIAL3_H
+
+#endif // TUTORIAL3_H
Index: examples/tutorial4/tutorial4.h
===================================================================
--- examples/tutorial4/tutorial4.h   (revision 910320)
+++ examples/tutorial4/tutorial4.h   (working copy)
@@ -17,3 +17,7 @@
 
 */
 
+#ifndef TUTORIAL4_H
+#define TUTORIAL4_H
+
+#endif // TUTORIAL4_h
Index: examples/tutorial5/tutorial5.h
===================================================================
--- examples/tutorial5/tutorial5.h   (revision 910320)
+++ examples/tutorial5/tutorial5.h   (working copy)
@@ -17,3 +17,7 @@
 
 */
 
+#ifndef TUTORIAL5_H
+#define TUTORIAL5_H
+
+#endif // TUTORIAL5_H
[hr]
And here is the patch for i18n problem (passing QString for startsWith() and endsWith())

Code: Select all
Index: solid/backends/hal/haldvbinterface.cpp
===================================================================
--- solid/backends/hal/haldvbinterface.cpp   (revision 910320)
+++ solid/backends/hal/haldvbinterface.cpp   (working copy)
@@ -52,7 +52,7 @@
         return -1;
     string = string.mid(pos + 1);
 
-    if (!string.startsWith("adapter"))
+    if (!string.startsWith(QString("adapter")))
         return -1;
     string = string.mid(7);
 
@@ -94,31 +94,31 @@
         return false;
     string = string.mid(pos + 1);
 
-    if (string.startsWith("audio")) {
+    if (string.startsWith(QString("audio"))) {
         *type = Solid::DvbInterface::DvbAudio;
         string = string.mid(5);
-    } else if (string.startsWith("ca")) {
+    } else if (string.startsWith(QString("ca"))) {
         *type = Solid::DvbInterface::DvbCa;
         string = string.mid(2);
-    } else if (string.startsWith("demux")) {
+    } else if (string.startsWith(QString("demux"))) {
         *type = Solid::DvbInterface::DvbDemux;
         string = string.mid(5);
-    } else if (string.startsWith("dvr")) {
+    } else if (string.startsWith(QString("dvr"))) {
         *type = Solid::DvbInterface::DvbDvr;
         string = string.mid(3);
-    } else if (string.startsWith("frontend")) {
+    } else if (string.startsWith(QString("frontend"))) {
         *type = Solid::DvbInterface::DvbFrontend;
         string = string.mid(8);
-    } else if (string.startsWith("net")) {
+    } else if (string.startsWith(QString("net"))) {
         *type = Solid::DvbInterface::DvbNet;
         string = string.mid(3);
-    } else if (string.startsWith("osd")) {
+    } else if (string.startsWith(QString("osd"))) {
         *type = Solid::DvbInterface::DvbOsd;
         string = string.mid(3);
-    } else if (string.startsWith("sec")) {
+    } else if (string.startsWith(QString("sec"))) {
         *type = Solid::DvbInterface::DvbSec;
         string = string.mid(3);
-    } else if (string.startsWith("video")) {
+    } else if (string.startsWith(QString("video"))) {
         *type = Solid::DvbInterface::DvbVideo;
         string = string.mid(5);
     } else
Index: solid/backends/hal/halvolume.cpp
===================================================================
--- solid/backends/hal/halvolume.cpp   (revision 910320)
+++ solid/backends/hal/halvolume.cpp   (working copy)
@@ -51,8 +51,8 @@
     bool hotpluggable = drive.property("storage.hotpluggable").toBool();
 
     return !removable && !hotpluggable
-        && mounted && !mount_point.startsWith("/media/")
-        && !mount_point.startsWith("/mnt/");
+        && mounted && !mount_point.startsWith(QString("/media/"))
+        && !mount_point.startsWith(QString("/mnt/"));
 }
 
 Solid::StorageVolume::UsageType Volume::usage() const
Index: solid/backends/wmi/wmidvbinterface.cpp
===================================================================
--- solid/backends/wmi/wmidvbinterface.cpp   (revision 910320)
+++ solid/backends/wmi/wmidvbinterface.cpp   (working copy)
@@ -52,7 +52,7 @@
         return -1;
     string = string.mid(pos + 1);
 
-    if (!string.startsWith("adapter"))
+    if (!string.startsWith(QString("adapter")))
         return -1;
     string = string.mid(7);
 
@@ -94,31 +94,31 @@
         return false;
     string = string.mid(pos + 1);
 
-    if (string.startsWith("audio")) {
+    if (string.startsWith(QString("audio"))) {
         *type = Solid::DvbInterface::DvbAudio;
         string = string.mid(5);
-    } else if (string.startsWith("ca")) {
+    } else if (string.startsWith(QString("ca"))) {
         *type = Solid::DvbInterface::DvbCa;
         string = string.mid(2);
-    } else if (string.startsWith("demux")) {
+    } else if (string.startsWith(QString("demux"))) {
         *type = Solid::DvbInterface::DvbDemux;
         string = string.mid(5);
-    } else if (string.startsWith("dvr")) {
+    } else if (string.startsWith(QString("dvr"))) {
         *type = Solid::DvbInterface::DvbDvr;
         string = string.mid(3);
-    } else if (string.startsWith("frontend")) {
+    } else if (string.startsWith(QString("frontend"))) {
         *type = Solid::DvbInterface::DvbFrontend;
         string = string.mid(8);
-    } else if (string.startsWith("net")) {
+    } else if (string.startsWith(QString("net"))) {
         *type = Solid::DvbInterface::DvbNet;
         string = string.mid(3);
-    } else if (string.startsWith("osd")) {
+    } else if (string.startsWith(QString("osd"))) {
         *type = Solid::DvbInterface::DvbOsd;
         string = string.mid(3);
-    } else if (string.startsWith("sec")) {
+    } else if (string.startsWith(QString("sec"))) {
         *type = Solid::DvbInterface::DvbSec;
         string = string.mid(3);
-    } else if (string.startsWith("video")) {
+    } else if (string.startsWith(QString("video"))) {
         *type = Solid::DvbInterface::DvbVideo;
         string = string.mid(5);
     } else
Index: solid/backends/wmi/wmivolume.cpp
===================================================================
--- solid/backends/wmi/wmivolume.cpp   (revision 910320)
+++ solid/backends/wmi/wmivolume.cpp   (working copy)
@@ -51,8 +51,8 @@
 
 
     return !removable && !hotpluggable
-        && mounted && !mount_point.startsWith("/media/")
-        && !mount_point.startsWith("/mnt/");
+        && mounted && !mount_point.startsWith(QString("/media/"))
+        && !mount_point.startsWith(QString("/mnt/"));
 }
 
 Solid::StorageVolume::UsageType Volume::usage() const



Please try if the code still compiles with the changes and if it works and if it is ok, you can send it to the mailing list.

fengshaun wrote:And a question, what should I do with http://lxr.kde.org/source/KDE/kdelibs/s ... nterface.h at line 94? Should I simply make in not-inline and move the implementation to the .cpp file?


You shouldn't change anything there because it is public API, but you can inform the developers about the issue on the mailing list and ask whether and how to handle it.

Last edited by msoeken on Wed Jan 14, 2009 11:41 am, edited 1 time in total.


Image
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size]
Pconfig
Alumni
Posts
74
Karma
0
OS

RE: [Kourse 3] Fixing krazy2 issues

Wed Jan 14, 2009 5:41 pm
Thanks for taking a look

msoeken wrote:You should ignore this, because I saw there is for example KIcon("phrase") where phrase is an icon installed by the application. krazy cannot know that. You can suppress it with krazy comments

Will fix it with commenting issues.


msoeken wrote:I do not know what you mean by making links of the desktop files.
this->open() should be fine. Does krazy complain about it?

Well these .desktop files represent some kind of books. They're not application, nor directories. But krazy2 tells us that "Type" is required and there are only three valid types available


Krazy doesn't complain anymore but i changed open() to this->open(). This might cause another function to be invoked. Krazy thought that open() started the system call open but i think that wasn't the case here.

Last edited by Pconfig on Wed Jan 14, 2009 5:42 pm, edited 1 time in total.
bruno
KDE Developer
Posts
40
Karma
0
OS

RE: [Kourse 3] Fixing krazy2 issues

Wed Jan 14, 2009 9:44 pm
I know how to change the foreach of the SizeHint object here below, but for the QPair, krazy2 don't accept it. What I'm doing wrong?

Code: Select all
Index: lancelot/libs/lancelot/layouts/NodeLayout.cpp
===================================================================
--- lancelot/libs/lancelot/layouts/NodeLayout.cpp       (révision 911112)
+++ lancelot/libs/lancelot/layouts/NodeLayout.cpp       (copie de travail)
@@ -159,7 +159,7 @@

             QSizeF size;

-            foreach (Qt::SizeHint which, sizeHintCache.keys()) {
+            foreach (const Qt::SizeHint &which, sizeHintCache.keys()) {
                 size = item->effectiveSizeHint(which);
                 size.scale(
                     1 / qMin(scaled.width(), qreal(1.0)),

http://lxr.kde.org/source/KDE/kdeplasma ... ut.cpp#162

Code: Select all
Index: lancelot/libs/lancelot/widgets/ActionListView.cpp
===================================================================
--- lancelot/libs/lancelot/widgets/ActionListView.cpp   (révision 911112)
+++ lancelot/libs/lancelot/widgets/ActionListView.cpp   (copie de travail)
@@ -144,8 +144,7 @@
 {
     int buttonIndex = m_topButtonIndex;

-    QPair  pair;
-    foreach (pair, m_buttons) {
+    foreach (const QPair &pair, m_buttons) {
         if (pair.first == button) {
             itemContextRequested(buttonIndex);
             return;

http://lxr.kde.org/source/KDE/kdeplasma ... ew.cpp#148


bruno, proud to be a member of KDE forums since 2008-Oct.
fengshaun
Alumni
Posts
32
Karma
0
OS

RE: [Kourse 3] Fixing krazy2 issues

Thu Jan 15, 2009 12:33 am
msoeken: Yup, got your message. I will work on it after preparing for my debate tomorrow (god, school is so annoying!)


A proud KDE user and Linux enthusiast.
bruno
KDE Developer
Posts
40
Karma
0
OS

RE: [Kourse 3] Fixing krazy2 issues

Thu Jan 15, 2009 2:33 am
For the qclasses one, it was weird than just "pastebin/pastebinConfig.ui" required me to add KComboBox, and if not added, the comboxes were present (when tested with plasmoidviewer) but they where empty (instead of having 2 item each).

qclasses
[code=diff]Index: comic/config.ui
===================================================================
--- comic/config.ui (révision 911112)
+++ comic/config.ui (copie de travail)
@@ -49,7 +49,7 @@



-
+


0
Index: fileWatcher/filtersConfig.ui
===================================================================
--- fileWatcher/filtersConfig.ui (révision 911112)
+++ fileWatcher/filtersConfig.ui (copie de travail)
@@ -50,7 +50,7 @@



-
+



Index: lancelot/app/src/models/Devices.cpp
===================================================================
--- lancelot/app/src/models/Devices.cpp (révision 911112)
+++ lancelot/app/src/models/Devices.cpp (copie de travail)
@@ -20,7 +20,7 @@

#include "Devices.h"

-#include
+#include
#include
#include

@@ -238,7 +238,7 @@
access->disconnect(this, SLOT(deviceSetupDone(Solid::ErrorType, QVariant, const QString &)));

if (!access || !access->isAccessible()) {
- QMessageBox::critical(NULL, i18n("Failed to open"), i18n("The requested device can not be accessed."));
+ KMessageBox::error(NULL, i18n("Failed to open"), i18n("The requested device can not be accessed."));
return;
}

Index: weatherstation/weatherconfig.ui
===================================================================
--- weatherstation/weatherconfig.ui (révision 911112)
+++ weatherstation/weatherconfig.ui (copie de travail)
@@ -189,7 +189,7 @@



-
+


0
@@ -218,7 +218,7 @@



-
+


0
@@ -247,7 +247,7 @@



-
+


0
Index: weatherstation/weatherconfigsearch.ui
===================================================================
--- weatherstation/weatherconfigsearch.ui (révision 911112)
+++ weatherstation/weatherconfigsearch.ui (copie de travail)
@@ -24,7 +24,7 @@



-
+



@@ -57,7 +57,7 @@


KComboBox
- QComboBox
+ KComboBox
kcombobox.h


Index: twitter/configuration.ui
===================================================================
--- twitter/configuration.ui (révision 911112)
+++ twitter/configuration.ui (copie de travail)
@@ -37,9 +37,9 @@



-
+

- QLineEdit::Password
+ KLineEdit::Password



@@ -221,7 +221,7 @@



-
+



Index: frame/config.ui
===================================================================
--- frame/config.ui (révision 911112)
+++ frame/config.ui (copie de travail)
@@ -29,7 +29,7 @@



-
+


Image
@@ -290,7 +290,7 @@



-
+



Index: pastebin/pastebinConfig.ui
===================================================================
--- pastebin/pastebinConfig.ui (révision 911112)
+++ pastebin/pastebinConfig.ui (copie de travail)
@@ -13,7 +13,7 @@



-
+


Pastebin.ca
@@ -34,7 +34,7 @@



-
+


Imagebin.ca
@@ -49,6 +49,13 @@



+
+
+ KComboBox
+ QComboBox
+ kcombobox.h
+
+



Index: paste/snippetconfig.ui
===================================================================
--- paste/snippetconfig.ui (révision 911112)
+++ paste/snippetconfig.ui (copie de travail)
@@ -55,7 +55,7 @@



-
+



@@ -82,7 +82,7 @@



-
+


0
@@ -90,7 +90,7 @@



- QTextEdit::NoWrap
+ KTextEdit::NoWrap


false
Index: paste/addmacro.cpp
===================================================================
--- paste/addmacro.cpp (révision 911112)
+++ paste/addmacro.cpp (copie de travail)
@@ -18,10 +18,10 @@
#include "addmacro.h"
#include
#include
-#include
+#include
#include
#include
-#include
+#include
#include
#include
#include
@@ -39,7 +39,7 @@
m_layout->setMargin(0);
m_layout->setSpacing(spacingHint());

- m_macrosComboBox = new QComboBox(m_widget);
+ m_macrosComboBox = new KComboBox(m_widget);
const QMap& macros = PasteMacroExpander::instance().macros();
foreach (const QString& macro, macros.keys()) {
m_macrosComboBox->addItem(macros[macro][0].toString(), macro);
@@ -77,7 +77,7 @@
}
case MacroParam::String:
layout->addWidget(new QLabel(param.name + ':', m_params));
- layout->addWidget(w = new QLineEdit(m_params));
+ layout->addWidget(w = new KLineEdit(m_params));
break;
case MacroParam::Url:
layout->addWidget(new QLabel(param.name + ':'));
@@ -111,7 +111,7 @@
}
case MacroParam::String:
{
- QLineEdit* w = m_params->findChildren(param.name)[0];
+ KLineEdit* w = m_params->findChildren(param.name)[0];
values.append(w->text());
break;
}
Index: paste/addmacro.h
===================================================================
--- paste/addmacro.h (révision 911112)
+++ paste/addmacro.h (copie de travail)
@@ -21,7 +21,7 @@
#include
#include

-class QComboBox;
+class KComboBox;
class QVBoxLayout;

class AddMacro : public KDialog
@@ -37,7 +37,7 @@
void currentIndexChanged(int index);

private:
- QComboBox* m_macrosComboBox;
+ KComboBox* m_macrosComboBox;
QVBoxLayout* m_layout;
QWidget* m_widget;
QWidget* m_params;
[/code]

doublequote_chars
[code=diff]Index: lancelot/app/src/models/MessagesKmail.cpp
===================================================================
--- lancelot/app/src/models/MessagesKmail.cpp (révision 910278)
+++ lancelot/app/src/models/MessagesKmail.cpp (copie de travail)
@@ -128,7 +128,7 @@
QDBusReply ricon = m_folderinterface->normalIconPath();
KIcon icon;
add(
- name.value() + " (" + QString::number(unread) + ")", path,
+ name.value() + " (" + QString::number(unread) + ')', path,
KIcon(
(ricon.isValid() && !ricon.value().isEmpty())
? (ricon.value()) : "mail-folder-inbox"
Index: lancelot/app/src/models/ContactsKopete.cpp
===================================================================
--- lancelot/app/src/models/ContactsKopete.cpp (révision 910278)
+++ lancelot/app/src/models/ContactsKopete.cpp (copie de travail)
@@ -89,7 +89,7 @@
}

foreach (const QString& contact, contacts.value()) {
- QStringList contactParts = contact.split(":");
+ QStringList contactParts = contact.split(':');
if (contactParts.size() != 3) {
continue;
}
@@ -103,7 +103,7 @@
continue;
}

- QString avatarPath = m_kopeteAvatarsDir + "/" + account + "/" + contactID + ".png";
+ QString avatarPath = m_kopeteAvatarsDir + '/' + account + '/' + contactID + ".png";
add(contactName.value(), contactID,
KIcon(
(QFile::exists(avatarPath))?avatarPath:"user-online"
Index: lancelot/app/src/models/BaseModel.cpp
===================================================================
--- lancelot/app/src/models/BaseModel.cpp (révision 910278)
+++ lancelot/app/src/models/BaseModel.cpp (copie de travail)
@@ -92,7 +92,7 @@
{
int result = 0;
foreach (const QString & serviceAlternatives, serviceNames) {
- foreach (const QString & serviceName, serviceAlternatives.split("|")) {
+ foreach (const QString & serviceName, serviceAlternatives.split('|')) {
if (addService(serviceName)) {
++result;
break;
Index: lancelot/app/src/parts/LancelotPart.cpp
===================================================================
--- lancelot/app/src/parts/LancelotPart.cpp (révision 910278)
+++ lancelot/app/src/parts/LancelotPart.cpp (copie de travail)
@@ -356,7 +356,7 @@

if (loaded) {
if (!m_data.isEmpty()) {
- m_data += "n";
+ m_data += 'n';
}
m_data += input;
saveConfig();
@@ -393,7 +393,7 @@
if (data.isEmpty()) {
return false;
}
- return loadFromList(data.split("n"));
+ return loadFromList(data.split('n'));
}

void LancelotPart::removeModel(int index)
@@ -404,7 +404,7 @@
delete model;
}

- QStringList configs = m_data.split("n");
+ QStringList configs = m_data.split('n');
configs.removeAt(index);
m_data = configs.join("n");

Index: lancelot/app/src/Serializator.cpp
===================================================================
--- lancelot/app/src/Serializator.cpp (révision 910278)
+++ lancelot/app/src/Serializator.cpp (copie de travail)
@@ -34,11 +34,11 @@
i.next();

if (!result.isEmpty()) {
- result += "&";
+ result += '&';
}

result +=
- QUrl::toPercentEncoding(i.key()) + "=" +
+ QUrl::toPercentEncoding(i.key()) + '=' +
QUrl::toPercentEncoding(i.value());
}
return result;
@@ -48,9 +48,9 @@
{
QMap result;

- QStringList items = data.split("&");
+ QStringList items = data.split('&');
foreach (const QString & item, items) {
- QStringList broken = item.split("=");
+ QStringList broken = item.split('=');
if (broken.size() != 2) {
continue;
}
Index: lancelot/libs/lancelot/Global.cpp
===================================================================
--- lancelot/libs/lancelot/Global.cpp (révision 910278)
+++ lancelot/libs/lancelot/Global.cpp (copie de travail)
@@ -321,7 +321,7 @@
if (app == "lancelot") {
app = "";
} else {
- app += "-";
+ app += '-';
}

d->confMain = new KConfig("lancelot" + app + "rc");
Index: weatherstation/weatherstation.cpp
===================================================================
--- weatherstation/weatherstation.cpp (révision 910278)
+++ weatherstation/weatherstation.cpp (copie de travail)
@@ -285,7 +285,7 @@

void WeatherStation::setHumidity(QString humidity)
{
- humidity.replace("%", "");
+ humidity.remove('%');
m_lcd->setNumber("humidity", humidity);
}

Index: weatherstation/weatherconfig.cpp
===================================================================
--- weatherstation/weatherconfig.cpp (révision 910278)
+++ weatherstation/weatherconfig.cpp (copie de travail)
@@ -133,7 +133,7 @@
if (m_dataengine) {
QVariantList plugins = m_dataengine->query("ions").values();
foreach (const QVariant& plugin, plugins) {
- QStringList pluginInfo = plugin.toString().split("|");
+ QStringList pluginInfo = plugin.toString().split('|');
providerComboBox->addItem(pluginInfo[0], pluginInfo[1]);
}
}
Index: previewer/previewwidget.cpp
===================================================================
--- previewer/previewwidget.cpp (révision 910278)
+++ previewer/previewwidget.cpp (copie de travail)
@@ -494,7 +494,7 @@
painter->setFont(font);
painter->setPen(Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor));
painter->drawText(QRect(39, 3, contentsRect.width() - 39, 30), Qt::AlignBottom | Qt::AlignLeft,
- " " + i18n("Previewer"));
+ ' ' + i18n("Previewer"));
QFontMetrics fm(font);
int length = fm.width(i18n("Previewer") + " ");
font.setBold(false);
Index: bluemarble/kwinglutils.cpp
===================================================================
--- bluemarble/kwinglutils.cpp (révision 910278)
+++ bluemarble/kwinglutils.cpp (copie de travail)
@@ -65,7 +65,7 @@
glVersion = MAKE_GL_VERSION(glversioninfo[0].toInt(), glversioninfo[1].toInt(),
glversioninfo.count() > 2 ? glversioninfo[2].toInt() : 0);
// Get list of supported OpenGL extensions
- glExtensions = QString((const char*)glGetString(GL_EXTENSIONS)).split(" ");
+ glExtensions = QString((const char*)glGetString(GL_EXTENSIONS)).split(' ');

// handle OpenGL extensions functions
glResolveFunctions();
Index: news/news.cpp
===================================================================
--- news/news.cpp (révision 910278)
+++ news/news.cpp (copie de travail)
@@ -351,7 +351,7 @@
}
uint timeStamp = item["time"].toUInt();
QString title = item["title"].toString();
- QString description = item["description"].toString().replace(QRegExp("]*>"), "");
+ QString description = item["description"].toString().remove(QRegExp("]*>"));
QString line;

if (title != 0 && m_showTitles) {
Index: rssnow/news.cpp
===================================================================
--- rssnow/news.cpp (révision 910278)
+++ rssnow/news.cpp (copie de travail)
@@ -325,7 +325,7 @@
if (m_showdroptarget && (i == (m_layout->count() - 1))) {
m_feedlist.append(feeds);
} else {
- if (!m_feedlist[i-start].endsWith(" ")) {
+ if (!m_feedlist[i-start].endsWith(' ')) {
m_feedlist[i-start].append(" ");
}
m_feedlist[i-start].append(feeds);
@@ -353,7 +353,7 @@
//group all feeds together so it can fit (only a single time):
QString allfeeds;
foreach (QString feed, m_feedlist) {
- if (!feed.endsWith(" ")) {
+ if (!feed.endsWith(' ')) {
feed.append(" ");
}
allfeeds.append(feed);
Index: pastebin/backends/pastebinca.cpp
===================================================================
--- pastebin/backends/pastebinca.cpp (révision 910278)
+++ pastebin/backends/pastebinca.cpp (copie de travail)
@@ -44,7 +44,7 @@
}

QString url(_data);
- url.replace("SUCCESS:","");
+ url.remove("SUCCESS:");
url.prepend(QString("%1/").arg(m_server));
emit postFinished(url);
}[/code]

emptystrcompare
[code=diff]Index: lancelot/app/src/models/Devices.cpp
===================================================================
--- lancelot/app/src/models/Devices.cpp (révision 910278)
+++ lancelot/app/src/models/Devices.cpp (copie de travail)
@@ -39,7 +39,7 @@

namespace Models {

-#define StringCoalesce(A, B) (A == "")?(B):(A)
+#define StringCoalesce(A, B) (A.isEmpty())?(B):(A)

Devices::Devices(Type filter)
: m_filter(filter)
Index: lancelot/libs/lancelot/Global.cpp
===================================================================
--- lancelot/libs/lancelot/Global.cpp (révision 910278)
+++ lancelot/libs/lancelot/Global.cpp (copie de travail)
@@ -330,11 +330,11 @@
kDebug() &urls, QObject *parent = 0)
+ explicit PreviewItemModel(const QList &urls, QObject *parent = 0)
: QAbstractListModel(parent), urlList(urls) {}

int rowCount(const QModelIndex &parent = QModelIndex()) const;
Index: bluemarble/kwinglutils.h
===================================================================
--- bluemarble/kwinglutils.h (révision 911112)
+++ bluemarble/kwinglutils.h (copie de travail)
@@ -64,8 +64,8 @@
{
public:
GLTexture();
- GLTexture( const QImage& image, GLenum target = GL_TEXTURE_2D );
- GLTexture( const QPixmap& pixmap, GLenum target = GL_TEXTURE_2D );
+ explicit GLTexture( const QImage& image, GLenum target = GL_TEXTURE_2D );
+ explicit GLTexture( const QPixmap& pixmap, GLenum target = GL_TEXTURE_2D );
GLTexture( const QString& fileName );
GLTexture( int width, int height );
virtual ~GLTexture();
Index: paste/pastemacroexpander.h
===================================================================
--- paste/pastemacroexpander.h (révision 911112)
+++ paste/pastemacroexpander.h (copie de travail)
@@ -33,7 +33,7 @@
Url
};

- MacroParam(const QString& n = QString(), ParamType t = String) : name(n), type(t) {};
+ explicit MacroParam(const QString& n = QString(), ParamType t = String) : name(n), type(t) {};
QString name;
ParamType type;
};
[/code]

nullstrassign
[code=diff]Index: weatherstation/weatherconfig.cpp
===================================================================
--- weatherstation/weatherconfig.cpp (révision 911112)
+++ weatherstation/weatherconfig.cpp (copie de travail)
@@ -93,7 +93,7 @@
places[result[i + 1]] = result[i + 3];
i += 4;
} else {
- places[result[i + 1]] = QString();
+ places[result[i + 1]].clear();
i += 2;
}
}
[/code]

nullstrcompare
[code=diff]Index: lancelot/libs/lancelot/widgets/Panel.cpp
===================================================================
--- lancelot/libs/lancelot/widgets/Panel.cpp (révision 911112)
+++ lancelot/libs/lancelot/widgets/Panel.cpp (copie de travail)
@@ -29,7 +29,7 @@
public:
Private(QIcon icon, QString title, Panel * parent)
: layoutItem(NULL),
- hasTitle(title != QString()),
+ hasTitle(!title.isEmpty()),
titleWidget(icon, title, "", parent),
q(parent)
{
@@ -38,7 +38,7 @@

Private(QString title, Panel * parent)
: layoutItem(NULL),
- hasTitle(title != QString()),
+ hasTitle(!title.isEmpty()),
titleWidget(title, "", parent),
q(parent)
{
[/code]

sigsandslots
[code=diff]Index: lancelot/libs/lancelot/models/ActionListViewModels.h
===================================================================
--- lancelot/libs/lancelot/models/ActionListViewModels.h (révision 911112)
+++ lancelot/libs/lancelot/models/ActionListViewModels.h (copie de travail)
@@ -126,7 +126,7 @@
*/
virtual void contextActivate(int index, QAction * context);

-public slots:
+public Q_SLOTS:
/**
* Activates the specified element
* @param index of the element that should be activated
@@ -408,7 +408,7 @@
QList > m_modelsMetadata;
bool m_hideEmptyModels;

-private slots:
+private Q_SLOTS:
// listen to model changes
void modelUpdated();
void modelItemInserted(int index);
Index: lancelot/libs/lancelot/widgets/ActionListView.h
===================================================================
--- lancelot/libs/lancelot/widgets/ActionListView.h (révision 911112)
+++ lancelot/libs/lancelot/widgets/ActionListView.h (copie de travail)
@@ -96,7 +96,7 @@
Q_SIGNALS:
void activated(int index);

-protected slots:
+protected Q_SLOTS:
void scrollTimer();
void itemActivated(int index);
void itemContextRequested(int index);
Index: lancelot/libs/lancelot/widgets/ExtenderButton.h
===================================================================
--- lancelot/libs/lancelot/widgets/ExtenderButton.h (révision 911112)
+++ lancelot/libs/lancelot/widgets/ExtenderButton.h (copie de travail)
@@ -138,7 +138,7 @@
L_Override virtual void paint(QPainter * painter,
const QStyleOptionGraphicsItem * option, QWidget * widget = 0);

-public slots:
+public Q_SLOTS:
/**
* Sets whether the button is checked.
* Has no effect if button is not checkable.
@@ -169,7 +169,7 @@
L_Override virtual void hoverEnterEvent(QGraphicsSceneHoverEvent * event);
L_Override virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent * event);

-protected slots:
+protected Q_SLOTS:
void activate();

private:
[/code]

spelling
[code=diff]Index: twitter/twitter.cpp
===================================================================
--- twitter/twitter.cpp (révision 911112)
+++ twitter/twitter.cpp (copie de travail)
@@ -303,7 +303,7 @@
if (success &&
enterWalletFolder(QString::fromLatin1("Plasma-Twitter")) &&
(m_wallet->readPassword(m_username, pwd) == 0)) {
- kDebug() << "successfully retreived password from wallet";
+ kDebug() << "successfully retrieved password from wallet";
m_password = pwd;
downloadHistory();
} else if (m_password.isEmpty()) {
[/code]

Last edited by bruno on Thu Jan 15, 2009 9:43 pm, edited 1 time in total.


bruno, proud to be a member of KDE forums since 2008-Oct.
User avatar
msoeken
Mentor
Posts
300
Karma
4
OS

RE: [Kourse 3] Fixing krazy2 issues

Thu Jan 15, 2009 7:37 pm
Great work, Bruno. I already saw your mail to the mailing list. But I am not sure about the following change:
Code: Select all
#
-#define StringCoalesce(A, B) (A == "")?:(A)
#
+#define StringCoalesce(A, B) (A.isEmpty())?:(A)

Could you point out where this is used? I am wondering because there are no quotes around the html tags. Not that this change causes a bug somewhere.

Also thanks to pklaffert for his bugfixes. He also send a mail to the mailing list.

And of couse thanks to the other students. I do not follow each mailing list. If you already mailed something, please post the link as reply to this thread.

Cheers, m.

Last edited by msoeken on Thu Jan 15, 2009 8:11 pm, edited 1 time in total.


Image
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size]
bruno
KDE Developer
Posts
40
Karma
0
OS

RE: [Kourse 3] Fixing krazy2 issues

Thu Jan 15, 2009 9:45 pm
msoeken wrote:Great work, Bruno. I already saw your mail to the mailing list. But I am not sure about the following change:
Code: Select all
#
-#define StringCoalesce(A, B) (A == "")?:(A)
#
+#define StringCoalesce(A, B) (A.isEmpty())?:(A)

Could you point out where this is used? I am wondering because there are no quotes around the html tags. Not that this change causes a bug somewhere.


Thanks!

My bad, I didn't thought about deactivating the smileys. It should read :

Code: Select all
#
-#define StringCoalesce(A, B) (A == "")?(B):(A)
#
+#define StringCoalesce(A, B) (A.isEmpty())?(B):(A)


bruno, proud to be a member of KDE forums since 2008-Oct.
User avatar
msoeken
Mentor
Posts
300
Karma
4
OS

RE: [Kourse 3] Fixing krazy2 issues

Thu Jan 15, 2009 10:03 pm
bruno wrote:Thanks!

My bad, I didn't thought about deactivating the smileys. It should read :


That's funny ... and very confusing ;)


Image
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size]
bruno
KDE Developer
Posts
40
Karma
0
OS

RE: [Kourse 3] Fixing krazy2 issues

Fri Jan 16, 2009 12:23 am
msoeken wrote:
bruno wrote:Thanks!

My bad, I didn't thought about deactivating the smileys. It should read :


That's funny ... and very confusing ;)


Indeed :-D

Patches sent to the mailing list.


bruno, proud to be a member of KDE forums since 2008-Oct.
pklaffert
Alumni
Posts
3
Karma
0
OS

RE: [Kourse 3] Fixing krazy2 issues

Fri Jan 16, 2009 2:06 pm
I fixed some of the minor krazy2 issues in kdeplasma-addons.

Code: Select all
Index: applets/luna/phases.cpp
===================================================================
--- applets/luna/phases.cpp   (Revision 911885)
+++ applets/luna/phases.cpp   (Arbeitskopie)
@@ -232,7 +232,7 @@
   O = torad(O);
 
   /* all those planetary arguments, too! */
-  for (i=1; inumber.toString() + " " + d->unit;
+    return d->number.toString() + ' ' + d->unit;
 }
 
 QVariant Value::number() const
Index: libs/conversion/unit.cpp
===================================================================
--- libs/conversion/unit.cpp   (Revision 911885)
+++ libs/conversion/unit.cpp   (Arbeitskopie)
@@ -31,4 +31,5 @@
 
 }
 
-#include "unit.moc"
 No newline at end of file
+#include "unit.moc"
+

 


patch already send to the mailing list

Last edited by pklaffert on Fri Jan 16, 2009 4:03 pm, edited 1 time in total.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kesang, Sogou [Bot], Yahoo [Bot]