[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [patch] fixes for stuff ebn doesn't like about
From:       Simon =?utf-8?q?Schmei=C3=9Fer?= <mail_to_wrt () gmx ! de>
Date:       2007-02-09 22:15:02
Message-ID: 200702092315.02919.mail_to_wrt () gmx ! de
[Download RAW message or body]

hi

did some work again, here are some more patches. like the last one they are 
based on current kde-trunk.

as proposed by Ian Wadham I'll now have a look at kdegames, but maybe if I 
feel like doing some dumb and relaxing work again I'll continue cleaning up 
ebn-problems.

cu Simon

["kdeaddons-atlantikdesigner-ebn.diff" (text/x-diff)]

Index: designer/designer.cpp
===================================================================
--- designer/designer.cpp	(revision 632021)
+++ designer/designer.cpp	(working copy)
@@ -214,7 +214,7 @@
 {
 	if (warnClose())
 		return;
-	filename = QString::null;
+	filename.clear();
 
 	max = 40;
 
@@ -624,7 +624,7 @@
 void AtlanticDesigner::saveAs()
 {
 	QString oldfilename = filename;
-	filename = QString::null;
+	filename.clear();
 
 	save();
 
Index: designer/group.h
===================================================================
--- designer/group.h	(revision 632021)
+++ designer/group.h	(working copy)
@@ -58,7 +58,7 @@
 	Q_OBJECT
 
 	public:
-	GroupEditor(ConfigEstateGroupList *, QWidget *parent=0);
+	explicit GroupEditor(ConfigEstateGroupList *, QWidget *parent=0);
 
 	signals:
 	void changed();
Index: designer/boardinfo.cpp
===================================================================
--- designer/boardinfo.cpp	(revision 632021)
+++ designer/boardinfo.cpp	(working copy)
@@ -126,7 +126,7 @@
 
 ///////////////////////////////////
 
-LotsaEdits::LotsaEdits(bool editable, QStringList defaults, QWidget *parent) 
+LotsaEdits::LotsaEdits(bool editable, const QStringList &defaults, QWidget *parent) 
         : QWidget(parent)
 {
 	list.setAutoDelete(true);
@@ -148,7 +148,7 @@
 
 	layout->addStretch();
 
-	for (QStringList::Iterator it = defaults.begin(); it != defaults.end(); ++it)
+	for (QStringList::const_iterator it = defaults.begin(); it != defaults.end(); ++it)
 	{
 		more();
 		if (editable)
Index: designer/designer.h
===================================================================
--- designer/designer.h	(revision 632021)
+++ designer/designer.h	(working copy)
@@ -30,7 +30,7 @@
 	Q_OBJECT
 
 	public:
-	AtlanticDesigner(QWidget *parent = 0, const char *name = 0);
+	explicit AtlanticDesigner(QWidget *parent = 0, const char *name = 0);
 	~AtlanticDesigner();
 
 	protected:
Index: designer/boardinfo.h
===================================================================
--- designer/boardinfo.h	(revision 632021)
+++ designer/boardinfo.h	(working copy)
@@ -34,7 +34,7 @@
 	Q_OBJECT
 
 	public:
-	LotsaEdits(bool, QStringList=QStringList(), QWidget *parent=0);
+	explicit LotsaEdits(bool, const QStringList &defaults = QStringList(), QWidget *parent=0);
 
 	public slots:
 	QStringList save();
Index: designer/editor.h
===================================================================
--- designer/editor.h	(revision 632021)
+++ designer/editor.h	(working copy)
@@ -32,7 +32,7 @@
 class ConfigEstate : public Estate
 {
 	public:
-	ConfigEstate(int estateId);
+	explicit ConfigEstate(int estateId);
 	void setEstateId(const int estateId);
 	int type()const { return m_type; };
 	void setType(const int type);
@@ -96,7 +96,7 @@
 	Q_OBJECT
 
 	public:
-	EstateDlg(QWidget *parent = 0) : QWidget(parent) { estate = 0; };
+	explicit EstateDlg(QWidget *parent = 0) : QWidget(parent) { estate = 0; };
 
 	signals:
 	void updateBackground();
@@ -234,7 +234,7 @@
 	Q_OBJECT
 
 	public:
-	TaxDlg(QWidget *parent = 0);
+	explicit TaxDlg(QWidget *parent = 0);
 
 	protected:
 	virtual void save();
@@ -250,7 +250,7 @@
 	Q_OBJECT
 
 	public:
-	GenericDlg(QWidget *parent = 0);
+	explicit GenericDlg(QWidget *parent = 0);
 
 	protected:
 	virtual void save();
@@ -289,7 +289,7 @@
 	Q_OBJECT
 
 	public:
-	StreetDlg(ConfigEstateGroupList *, QWidget *parent = 0);
+	explicit StreetDlg(ConfigEstateGroupList *, QWidget *parent = 0);
 
 	protected:
 	virtual void save();

["kdeaddons-kate-ebn.diff" (text/x-diff)]

Index: xmltools/plugin_katexmltools.cpp
===================================================================
--- xmltools/plugin_katexmltools.cpp	(revision 632021)
+++ xmltools/plugin_katexmltools.cpp	(working copy)
@@ -66,7 +66,7 @@
 -Show expanded entities with QChar::QChar( int rc ) + unicode font
 -Don't ignore entities defined in the document's prologue
 -Only offer 'valid' elements, i.e. don't take the elements as a set but check
- if the DTD is matched ( order, number of occurences, ... )
+ if the DTD is matched ( order, number of occurrences, ... )
 
 -Maybe only read the meta DTD file once, then store the resulting QMap on disk ( \
using QDataStream )?  We'll then have to compare timeOf_cacheFile <-> timeOf_metaDtd.
@@ -366,11 +366,11 @@
 }
 
 Q3ValueList<KTextEditor::CompletionItem>
-PluginKateXMLTools::stringListToCompletionEntryList( QStringList list )
+PluginKateXMLTools::stringListToCompletionEntryList(const QStringList &list )
 {
   Q3ValueList<KTextEditor::CompletionItem> compList;
   KTextEditor::CompletionItem entry;
-  for( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+  for( QStringList::const_iterator it = list.begin(); it != list.end(); ++it )
   {
     entry=KTextEditor::CompletionItem(*it);
     compList << entry;
@@ -605,14 +605,14 @@
 
     if ( dtd && dtd->allowedElements(list[0]).contains("__EMPTY") )
     {
-      pre = "<" + text + "/>";
+      pre = '<' + text + "/>";
       if ( adjust )
         adjust++; // for the "/"
     }
     else
     {
-      pre = "<" + text + ">";
-      post ="</" + list[0] + ">";
+      pre = '<' + text + '>';
+      post ="</" + list[0] + '>';
     }
 
     QString marked;
@@ -643,7 +643,7 @@
   QString parentElement = getParentElement( *kv, false );
 
   //kDebug() << "parentElement: '" << parentElement << "'" << endl;
-  QString closeTag = "</" + parentElement + ">";
+  QString closeTag = "</" + parentElement + '>';
   if( ! parentElement.isEmpty() )
     kv->insertText( closeTag );
 }
@@ -677,7 +677,7 @@
     // and we want the correct completion even if the user started typing
     // e.g. in lower case but the entity is in upper case
     kv->getDoc()->removeText( line, col - (ce->text.length() - text->length()), \
                line, col );
-    *text = ce->text + ";";
+    *text = ce->text + ';';
   }
 
   else if( m_mode == attributes )
@@ -687,7 +687,7 @@
     if( !rightCh.isEmpty() && rightCh != ">" && rightCh != "/" && rightCh != " " )
     {	// TODO: other whitespaces
       // add space in front of the next attribute
-      *text = *text + " ";
+      *text = *text + ' ';
       m_correctPos--;
     }
   }
@@ -736,11 +736,11 @@
     if ( isEmptyTag )
       str = "/>";
     else
-      str = "></" + ce->text + ">";
+      str = "></" + ce->text + '>';
     *text = *text + str;
 
     // Place the cursor where it is most likely wanted:
-    // allways inside the tag if the tag is empty AND the DTD indicates that there \
are attribs) +    // always inside the tag if the tag is empty AND the DTD indicates \
that there are attribs)  // outside for open tags, UNLESS there are mandatory \
attributes  if ( m_docDtds[docNumber]->requiredAttributes(ce->text).count()
          || ( isEmptyTag && m_docDtds[docNumber]->allowedAttributes( \
ce->text).count() ) ) @@ -954,7 +954,7 @@
     {
       do
       {
-        if( !line-- ) return QString::null; // reached start of document
+        if( !line-- ) return QString(); // reached start of document
         str = kv.document()->line(line );
         col = str.length();
       } while( !col );
@@ -974,7 +974,7 @@
         {
           case '<':
             // hmm... we were actually inside an element
-            return QString::null;
+            return QString();
 
           case '>':
             // we just hit an element boundary
@@ -1106,7 +1106,7 @@
       // entities, but they should be sorted next to each other.
       // TODO: currently it's undefined if e.g. "A" or "a" comes first, it depends \
on  // the meta DTD ( really? it seems to work okay?!? )
-      mapList[str.lower()+"_"] = str;
+      mapList[str.lower()+'_'] = str;
     }
     else
       mapList[str.lower()] = str;
@@ -1162,7 +1162,7 @@
   if( exec() )
     return combo->currentText();
 
-  return QString::null;
+  return QString();
 }
 //END InsertElement dialog
 // kate: space-indent on; indent-width 2; replace-tabs on; mixed-indent off;
Index: xmltools/plugin_katexmltools.h
===================================================================
--- xmltools/plugin_katexmltools.h	(revision 632021)
+++ xmltools/plugin_katexmltools.h	(working copy)
@@ -55,7 +55,7 @@
 
   public:
 
-    PluginKateXMLTools( QObject* parent = 0, const QStringList& = QStringList() );
+    explicit PluginKateXMLTools( QObject* parent = 0, const QStringList& = \
QStringList() );  virtual ~PluginKateXMLTools();
     void addView ( Kate::MainWindow *win );
     void removeView( Kate::MainWindow *win );
@@ -102,7 +102,7 @@
     enum Mode {none, entities, attributevalues, attributes, elements};
     enum PopupMode {noPopup, tagname, attributename, attributevalue, entityname};
 
-    Q3ValueList<KTextEditor::CompletionItem> stringListToCompletionEntryList( \
QStringList list ); +    Q3ValueList<KTextEditor::CompletionItem> \
stringListToCompletionEntryList( const QStringList &list );  
     /// Assign the PseudoDTD @p dtd to the Kate::Document @p doc
     void assignDTD( PseudoDTD *dtd, KTextEditor::Document *doc );
Index: xmltools/pseudo_dtd.cpp
===================================================================
--- xmltools/pseudo_dtd.cpp	(revision 632021)
+++ xmltools/pseudo_dtd.cpp	(working copy)
@@ -151,7 +151,7 @@
           subelementList["__EMPTY"] = true;
       }
 
-      // Now remove the elements not allowed (e.g. <a> is explicitely not allowed in \
<a> +      // Now remove the elements not allowed (e.g. <a> is explicitly not allowed \
in <a>  // in the HTML 4.01 Strict DTD):
       QDomNodeList exclusionsList = elem.elementsByTagName( "exclusions" );
       if( exclusionsList.length() > 0 )
@@ -193,7 +193,7 @@
 /**
  * Check which elements are allowed inside a parent element. This returns
  * a list of allowed elements, but it doesn't care about order or if only a certain
- * number of occurences is allowed.
+ * number of occurrences is allowed.
  */
 QStringList PseudoDTD::allowedElements( QString parentElement )
 {
Index: htmltools/plugin_katehtmltools.cpp
===================================================================
--- htmltools/plugin_katehtmltools.cpp	(revision 632021)
+++ htmltools/plugin_katehtmltools.cpp	(working copy)
@@ -133,7 +133,7 @@
 }
 
 
-void PluginKateHtmlTools::slipInHTMLtag (KTextEditor::View & view, QString text)  // \
PCP +void PluginKateHtmlTools::slipInHTMLtag (KTextEditor::View & view, const QString \
&text)  //  PCP  {
   view.document()->startEditing();
 
@@ -146,9 +146,9 @@
     view.removeSelectionText ();
   int line = 0, col = 0;
   view.cursorPosition ().position (line, col);
-  QString pre ("<" + text + ">");
+  QString pre ('<' + text + '>');
   QString post;
-  if (list.count () > 0)  post = "</" + list[0] + ">";
+  if (list.count () > 0)  post = "</" + list[0] + '>';
   view.document()->insertText (KTextEditor::Cursor (line,col),pre + marked + post);
 
   //  all this muck to leave the cursor exactly where the user
Index: htmltools/plugin_katehtmltools.h
===================================================================
--- htmltools/plugin_katehtmltools.h	(revision 632021)
+++ htmltools/plugin_katehtmltools.h	(working copy)
@@ -34,7 +34,7 @@
   Q_OBJECT
  
 public:
-  PluginKateHtmlTools( QObject* parent = 0, const QStringList& = QStringList() );
+  explicit PluginKateHtmlTools( QObject* parent = 0, const QStringList& = \
QStringList() );  virtual ~PluginKateHtmlTools();
 
   void addView (Kate::MainWindow *win);
@@ -49,7 +49,7 @@
 
   QString KatePrompt (const QString & strTitle, const QString &strPrompt,
 			     QWidget * that);
-  void slipInHTMLtag (KTextEditor::View & view, QString text);
+  void slipInHTMLtag (KTextEditor::View & view, const QString &text);
 
 public slots:
   void slotEditHTMLtag();
Index: kjswrapper/plugin_katekjswrapper.h
===================================================================
--- kjswrapper/plugin_katekjswrapper.h	(revision 632021)
+++ kjswrapper/plugin_katekjswrapper.h	(working copy)
@@ -74,7 +74,7 @@
   Q_OBJECT
 
   public:
-    PluginKateKJSWrapper( QObject* parent = 0, const char* name = 0, const \
QStringList& = QStringList() ); +    explicit PluginKateKJSWrapper( QObject* parent = \
0, const char* name = 0, const QStringList& = QStringList() );  virtual \
~PluginKateKJSWrapper();  
     void addView (Kate::MainWindow *win);
@@ -119,7 +119,7 @@
   friend class PluginKateKJSWrapper;
 
   public:
-    KateKJSWrapperConfigPage(KJS::Object pageConstructor,PluginKateKJSWrapper* \
parent = 0L, QWidget *parentWidget = 0L); +    explicit \
KateKJSWrapperConfigPage(KJS::Object pageConstructor,PluginKateKJSWrapper* parent = \
0L, QWidget *parentWidget = 0L);  ~KateKJSWrapperConfigPage() {};
 
     /** Reimplemented from Kate::PluginConfigPage
Index: kjswrapper/bindings.h
===================================================================
--- kjswrapper/bindings.h	(revision 632021)
+++ kjswrapper/bindings.h	(working copy)
@@ -20,7 +20,7 @@
 		class RefCountedObjectDict: public QObject, public QPtrDict<ObjectEntry> {
 			Q_OBJECT
 		public:
-			RefCountedObjectDict(int size);
+			explicit RefCountedObjectDict(int size);
 			void incRef();
 			void decRef();
 			KJS::Object jsObject(KJS::ExecState *exec, QObject *obj, KJSEmbed::JSObjectProxy \
*proxy); @@ -33,7 +33,7 @@
 
 		class Bindings: public KJSEmbed::Bindings::JSBindingPlugin {
 		public:
-			Bindings(QObject *parent);
+			explicit Bindings(QObject *parent);
 			virtual ~Bindings();
 			KJS::Object createBinding(KJSEmbed::KJSEmbedPart *jspart, KJS::ExecState *exec, \
const KJS::List &args) const;  void addBindings(KJS::ExecState *exec, KJS::Object \
                &target) const;
Index: kjswrapper/plugin_katekjswrapper.cpp
===================================================================
--- kjswrapper/plugin_katekjswrapper.cpp	(revision 632021)
+++ kjswrapper/plugin_katekjswrapper.cpp	(working copy)
@@ -364,7 +364,7 @@
 {
 #if 0
   config->writeEntry( "Command History Length", p->sb_cmdhistlen->value() );
-  // truncate the cmd hist if nessecary?
+  // truncate the cmd hist if necessary?
   config->writeEntry( "Start In", p->rg_startin->id(p->rg_startin->selected()) );
   config->sync();
 #endif
Index: tabbarextension/ktinytabbar.h
===================================================================
--- tabbarextension/ktinytabbar.h	(revision 632021)
+++ tabbarextension/ktinytabbar.h	(working copy)
@@ -75,7 +75,7 @@
     // NOTE: as the API here is very self-explaining the docs are in the cpp
     //       file, more clean imho.
 
-    KTinyTabBar( QWidget *parent = 0 );
+   explicit KTinyTabBar( QWidget *parent = 0 );
     virtual ~KTinyTabBar();
 
     void load( KConfig* config, const QString& group );
@@ -183,7 +183,7 @@
     void settingsChanged( KTinyTabBar* tabbar );
 
     /**
-     * This signal is emited whenever a highlight mark changes.
+     * This signal is emmited whenever a highlight mark changes.
      * Usually this is used to synchronice several tabbars.
      */
     void highlightMarksChanged( KTinyTabBar* tabbar );
Index: tabbarextension/plugin_katetabbarextension.h
===================================================================
--- tabbarextension/plugin_katetabbarextension.h	(revision 632021)
+++ tabbarextension/plugin_katetabbarextension.h	(working copy)
@@ -60,7 +60,7 @@
     friend class KatePluginTabBarExtension;
 
 public:
-    PluginView( Kate::MainWindow* mainwindow );
+    explicit PluginView( Kate::MainWindow* mainwindow );
     virtual ~PluginView();
 
     void updateLocation();
@@ -90,7 +90,7 @@
   Q_OBJECT
 
   public:
-    KatePluginTabBarExtension( QObject* parent = 0, const QStringList& = \
QStringList() ); +    explicit KatePluginTabBarExtension( QObject* parent = 0, const \
QStringList& = QStringList() );  virtual ~KatePluginTabBarExtension();
 
     Kate::PluginView *createView (Kate::MainWindow *mainWindow);
@@ -140,7 +140,7 @@
   friend class KatePluginTabBarExtension;
 
   public:
-    KateTabBarExtensionConfigPage (QObject* parent = 0L, QWidget *parentWidget = \
0L); +    explicit KateTabBarExtensionConfigPage (QObject* parent = 0L, QWidget \
*parentWidget = 0L);  ~KateTabBarExtensionConfigPage ();
 
     /**
Index: tabbarextension/ktinytabbarconfigpage.h
===================================================================
--- tabbarextension/ktinytabbarconfigpage.h	(revision 632021)
+++ tabbarextension/ktinytabbarconfigpage.h	(working copy)
@@ -48,7 +48,7 @@
 {
     Q_OBJECT
 public:
-    KTinyTabBarConfigPage( QWidget *parent = 0 );
+    explicit KTinyTabBarConfigPage( QWidget *parent = 0 );
 
     ~KTinyTabBarConfigPage();
 
Index: tabbarextension/ktinytabbarconfigdialog.h
===================================================================
--- tabbarextension/ktinytabbarconfigdialog.h	(revision 632021)
+++ tabbarextension/ktinytabbarconfigdialog.h	(working copy)
@@ -42,7 +42,7 @@
 {
     Q_OBJECT
 public:
-    KTinyTabBarConfigDialog( const KTinyTabBar* tabbar, QWidget *parent = 0 );
+    explicit KTinyTabBarConfigDialog( const KTinyTabBar* tabbar, QWidget *parent = 0 \
);  ~KTinyTabBarConfigDialog();
 
     KTinyTabBarConfigPage* configPage();
Index: tabbarextension/ktinytabbar.cpp
===================================================================
--- tabbarextension/ktinytabbar.cpp	(revision 632021)
+++ tabbarextension/ktinytabbar.cpp	(working copy)
@@ -180,7 +180,7 @@
  *  - button colors
  *  - much more!
  *  .
- * The original group is saved and restored at the end of this fuction.
+ * The original group is saved and restored at the end of this function.
  *
  * \note Call @p load() immediately after you created the tabbar, otherwise
  *       some properties might not be restored correctly (like highlighted 
@@ -230,7 +230,7 @@
 
 /**
  * Saves the settings to \a config into section \a group.
- * The original group is saved and restored at the end of this fuction.
+ * The original group is saved and restored at the end of this function.
  * See @p load() for more information.
  */
 void KTinyTabBar::save( KConfig* config, const QString& group ) const
Index: cppsymbolviewer/plugin_katesymbolviewer.h
===================================================================
--- cppsymbolviewer/plugin_katesymbolviewer.h	(revision 632021)
+++ cppsymbolviewer/plugin_katesymbolviewer.h	(working copy)
@@ -46,7 +46,7 @@
   Q_OBJECT
 
   public:
-    KatePluginSymbolViewerView (Kate::MainWindow *w);
+    explicit KatePluginSymbolViewerView (Kate::MainWindow *w);
     virtual ~KatePluginSymbolViewerView ();
 
     void parseSymbols(void);
@@ -88,7 +88,7 @@
   friend class KatePluginSymbolViewer;
 
   public:
-    KatePluginSymbolViewerConfigPage (QObject* parent = 0L, QWidget *parentWidget = \
0L); +    explicit KatePluginSymbolViewerConfigPage (QObject* parent = 0L, QWidget \
*parentWidget = 0L);  ~KatePluginSymbolViewerConfigPage ();
 
     /**
@@ -124,9 +124,8 @@
     /**
      * construct us
      * @param mw main window
-     * @param parent toolview
      */
-    KatePluginSymbolViewerView2 (Kate::MainWindow *mw);
+   explicit KatePluginSymbolViewerView2 (Kate::MainWindow *mw);
 
     /**
      * destruct us
@@ -145,7 +144,7 @@
   Q_OBJECT
 
   public:
-    KatePluginSymbolViewer( QObject* parent = 0, const QStringList& = QStringList() \
); +    explicit KatePluginSymbolViewer( QObject* parent = 0, const QStringList& = \
QStringList() );  virtual ~KatePluginSymbolViewer();
 
     Kate::PluginView *createView (Kate::MainWindow *mainWindow);
Index: cppsymbolviewer/plugin_katesymbolviewer.cpp
===================================================================
--- cppsymbolviewer/plugin_katesymbolviewer.cpp	(revision 632021)
+++ cppsymbolviewer/plugin_katesymbolviewer.cpp	(working copy)
@@ -147,10 +147,10 @@
       symbols->addColumn(i18n("Position"));
       symbols->setColumnWidthMode(1, Q3ListView::Manual);
       symbols->setColumnWidth ( 1, 0 );
-      symbols->setSorting(-1, FALSE);
+      symbols->setSorting(-1, false);
       symbols->setRootIsDecorated(0);
       symbols->setTreeStepSize(10);
-      symbols->setShowToolTips(TRUE);
+      symbols->setShowToolTips(true);
 
       /* First Symbols parsing here...*/
       parseSymbols();
Index: textfilter/plugin_katetextfilter.h
===================================================================
--- textfilter/plugin_katetextfilter.h	(revision 632021)
+++ textfilter/plugin_katetextfilter.h	(working copy)
@@ -36,7 +36,7 @@
   Q_OBJECT
 
   public:
-    PluginKateTextFilter( QObject* parent = 0, const QStringList& = QStringList() );
+    explicit PluginKateTextFilter( QObject* parent = 0, const QStringList& = \
QStringList() );  virtual ~PluginKateTextFilter();
 
     void addView (Kate::MainWindow *win);
Index: textfilter/plugin_katetextfilter.cpp
===================================================================
--- textfilter/plugin_katetextfilter.cpp	(revision 632021)
+++ textfilter/plugin_katetextfilter.cpp	(working copy)
@@ -111,7 +111,7 @@
 }
 
         void
-splitString (QString q, char c, QStringList &list)  //  PCP
+splitString (const QString &q, char c, QStringList &list)  //  PCP
 {
 
 // screw the OnceAndOnlyOnce Principle!
@@ -130,7 +130,7 @@
 
 
         static void  //  PCP
-slipInNewText (KTextEditor::View & view, QString pre, QString marked, QString post, \
bool reselect) +slipInNewText (KTextEditor::View & view, const QString &pre, const \
QString &marked, const QString &post, bool reselect)  {
 #ifdef __GNUC__
 #warning "kde4: this function is not used for the moment";
@@ -248,7 +248,7 @@
 
 
         static void  //  PCP
-slipInFilter (KShellProcess & shell, KTextEditor::View & view, QString command)
+slipInFilter (KShellProcess & shell, KTextEditor::View & view, const QString \
&command)  {
   if( !view.selection() ) return;
   QString marked = view.selectionText ();
Index: filetemplates/plugin/filetemplates.cpp
===================================================================
--- filetemplates/plugin/filetemplates.cpp	(revision 632021)
+++ filetemplates/plugin/filetemplates.cpp	(working copy)
@@ -433,7 +433,7 @@
           {
             kDebug()<<"looking for a hl mode -- "<<reHl.cap()<<endl;
             // this is overly complex, too bad the interface is
-            // not providing a resonable method..
+            // not providing a reasonable method..
             QString hlmode = reHl.cap( 1 );
             KTextEditor::HighlightingInterface \
*hi=KTextEditor::highlightingInterface(doc);  if (hi)
@@ -446,7 +446,7 @@
         continue; // skip this line
       }
       if ( numlines )
-        str += "\n";
+        str += '\n';
       str += tmp;
       numlines++;
     }
@@ -468,7 +468,7 @@
       docname = filename.left( filename.length() - 13 );
 
     // check for other documents matching this naming scheme,
-    // and do a count before chosing a name for this one
+    // and do a count before choosing a name for this one
     QString p = docname;
     p.replace( "%1", "\\d+" );
     p.replace( ".", "\\." );
@@ -578,7 +578,7 @@
   cmbGroup = new QComboBox( true, this );
   cmbGroup->insertStringList( kft->groups() );
   l->setBuddy( cmbGroup );
-  cmbGroup->setToolTip(i18n("<p>The group is used for chosing a "
+  cmbGroup->setToolTip(i18n("<p>The group is used for choosing a "
       "submenu for the plugin. If it is empty, 'Other' is used.</p>"
       "<p>You can type any string to add a new group to your menu.</p>") );
 
@@ -758,7 +758,7 @@
   QString sEmail = map["email"];
   QString _s = sFullname;
   if ( ! sEmail.isEmpty() )
-    _s += " <" + sEmail + ">";
+    _s += " <" + sEmail + '>';
   kti->leAuthor->setText( _s );
 
   // 3) chose a location - either the template directory (default) or
@@ -1014,7 +1014,7 @@
           continue;
 
         trymore = false;
-        tmp += "\n" + ln;
+        tmp += '\n' + ln;
       }
 
       file.close();
Index: filetemplates/plugin/filetemplates.h
===================================================================
--- filetemplates/plugin/filetemplates.h	(revision 632021)
+++ filetemplates/plugin/filetemplates.h	(working copy)
@@ -51,7 +51,7 @@
 
 /**
  * This template system has the following features:
- * It allows to create new documents that allready has some contents and a \
meaningfull + * It allows to create new documents that already have some content and \
                a meaningfull
  * document name.
  *
  * Any file can b e used as a template.
@@ -74,7 +74,7 @@
   Q_OBJECT
 
   public:
-    KateFileTemplates( QObject* parent = 0, const char* name = 0 );
+    explicit KateFileTemplates( QObject* parent = 0, const char* name = 0 );
     virtual ~KateFileTemplates();
 
     void addView (Kate::MainWindow *win);
@@ -156,7 +156,7 @@
 {
   Q_OBJECT
   public:
-    KateTemplateInfoWidget( QWidget *parent=0, TemplateInfo *info=0, \
KateFileTemplates *kft=0 ); +    explicit KateTemplateInfoWidget( QWidget *parent=0, \
TemplateInfo *info=0, KateFileTemplates *kft=0 );  ~KateTemplateInfoWidget() {};
 
     TemplateInfo *info;
@@ -229,7 +229,7 @@
 {
   Q_OBJECT
   public:
-    KateTemplateManager( KateFileTemplates *kft=0, QWidget *parent=0, const char \
*name=0 ); +    explicit KateTemplateManager( KateFileTemplates *kft=0, QWidget \
*parent=0, const char *name=0 );  ~KateTemplateManager() {};
 
   public slots:
Index: xmlcheck/plugin_katexmlcheck.cpp
===================================================================
--- xmlcheck/plugin_katexmlcheck.cpp	(revision 632021)
+++ xmlcheck/plugin_katexmlcheck.cpp	(working copy)
@@ -195,7 +195,7 @@
 		if( m_dtdname.isEmpty() ) {
 			msg = "No DOCTYPE found, will only check well-formedness.";
 		} else {
-			msg = "'" + m_dtdname + "' not found, will only check well-formedness.";
+			msg = ''' + m_dtdname + "' not found, will only check well-formedness.";
 		}
 		(void)new Q3ListViewItem(this, QString("1").rightJustified(4,' '), "", "", msg);
 		list_count++;
@@ -219,7 +219,7 @@
 			} else if( caret_pos != -1 || line_count == lines.size() ) {
 				// TODO: this fails if "^" occurs in the real text?!
 				if( line_count == lines.size() && caret_pos == -1 ) {
-					msg = msg+"\n"+line;
+					msg = msg+'\n'+line;
 				}
 				QString col = QString::number(caret_pos);
 				if( col == "-1" ) {
@@ -230,7 +230,7 @@
 				item = new Q3ListViewItem(this, QString::number(list_count).rightJustified(4,' \
'), linenumber, col, msg);  item->setMultiLinesEnabled(true);
 			} else {
-				msg = msg+"\n"+line;
+				msg = msg+'\n'+line;
 			}
 		}
 		sort();	// TODO?: insert in right order
@@ -310,7 +310,7 @@
     	KComponentData ins("katexmlcheckplugin");
 		QString catalogs;
 		catalogs += ins.dirs()->findResource("data", "ksgmltools2/customization/catalog");
-		catalogs += ":";
+		catalogs += ':';
 		catalogs += ins.dirs()->findResource("data", \
"ksgmltools2/docbook/xml-dtd-4.1.2/docbook.cat");  kDebug() << "catalogs: " << \
catalogs << endl;  setenv("SGML_CATALOG_FILES", QFile::encodeName( catalogs ).data(), \
                1);
Index: xmlcheck/plugin_katexmlcheck.h
===================================================================
--- xmlcheck/plugin_katexmlcheck.h	(revision 632021)
+++ xmlcheck/plugin_katexmlcheck.h	(working copy)
@@ -77,7 +77,7 @@
   Q_OBJECT
 
   public:
-	PluginKateXMLCheck( QObject* parent = 0, const QStringList& = QStringList() );
+	explicit PluginKateXMLCheck( QObject* parent = 0, const QStringList& = \
QStringList() );  virtual ~PluginKateXMLCheck();
 
 	void addView (Kate::MainWindow *win);
Index: insertcommand/plugin_kateinsertcommand.cpp
===================================================================
--- insertcommand/plugin_kateinsertcommand.cpp	(revision 632021)
+++ insertcommand/plugin_kateinsertcommand.cpp	(working copy)
@@ -271,7 +271,7 @@
 void PluginKateInsertCommand::applyConfig( InsertCommandConfigPage *p )
 {
   config->writeEntry( "Command History Length", p->sb_cmdhistlen->value() );
-  // truncate the cmd hist if nessecary?
+  // truncate the cmd hist if necesary?
   config->writeEntry( "Start In", p->rg_startin->id(p->rg_startin->selected()) );
   config->sync();
 }
Index: insertcommand/plugin_kateinsertcommand.h
===================================================================
--- insertcommand/plugin_kateinsertcommand.h	(revision 632021)
+++ insertcommand/plugin_kateinsertcommand.h	(working copy)
@@ -59,7 +59,7 @@
   Q_OBJECT
 
   public:
-    PluginKateInsertCommand( QObject* parent = 0, const char* name = 0, const \
QStringList& = QStringList() ); +  explicit  PluginKateInsertCommand( QObject* parent \
= 0, const char* name = 0, const QStringList& = QStringList() );  virtual \
~PluginKateInsertCommand();  
     void addView (Kate::MainWindow *win);
@@ -145,7 +145,7 @@
   friend class PluginKateInsertCommand;
 
   public:
-    InsertCommandConfigPage(QObject* parent = 0L, QWidget *parentWidget = 0L);
+    explicit InsertCommandConfigPage(QObject* parent = 0L, QWidget *parentWidget = \
0L);  ~InsertCommandConfigPage() {};
 
     /** Reimplemented from Kate::PluginConfigPage
Index: snippets/cwidgetsnippets.h
===================================================================
--- snippets/cwidgetsnippets.h	(revision 632021)
+++ snippets/cwidgetsnippets.h	(working copy)
@@ -17,7 +17,7 @@
 */
 class CWidgetSnippets : public CWidgetSnippetsBase {
 public:
-  CWidgetSnippets( QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 );
+  explicit CWidgetSnippets( QWidget* parent = 0, const char* name = 0, Qt::WFlags fl \
= 0 );  
   ~CWidgetSnippets();
 
Index: snippets/csnippet.cpp
===================================================================
--- snippets/csnippet.cpp	(revision 632021)
+++ snippets/csnippet.cpp	(working copy)
@@ -9,7 +9,7 @@
  ***************************************************************************/
 #include "csnippet.h"
 
-CSnippet::CSnippet(QString sKey, QString sValue, Q3ListViewItem *lvi, QObject \
*parent, const char *name) +CSnippet::CSnippet( const QString &sKey, const QString \
&sValue, Q3ListViewItem *lvi, QObject *parent, const char *name)  : QObject(parent, \
name), _sKey(sKey), _sValue(sValue), _lvi(lvi) {}  
 CSnippet::~CSnippet() {}
Index: snippets/plugin_katesnippets.cpp
===================================================================
--- snippets/plugin_katesnippets.cpp	(revision 632021)
+++ snippets/plugin_katesnippets.cpp	(working copy)
@@ -61,7 +61,7 @@
   );
   //</make connections>
 
-  lSnippets.setAutoDelete( TRUE ); // the list owns the objects
+  lSnippets.setAutoDelete( true ); // the list owns the objects
 
   config = new KConfig("katesnippetspluginrc");
   readConfig();
Index: snippets/csnippet.h
===================================================================
--- snippets/csnippet.h	(revision 632021)
+++ snippets/csnippet.h	(working copy)
@@ -22,7 +22,7 @@
 class CSnippet : public QObject {
   Q_OBJECT
 public:
-  CSnippet(QString sKey, QString sValue, Q3ListViewItem *lvi, QObject *parent = 0, \
const char *name = 0); +  CSnippet( const QString &sKey, const QString &sValue, \
Q3ListViewItem *lvi, QObject *parent = 0, const char *name = 0);  ~CSnippet();
   QString getKey() 						{ return _sKey; };
   QString getValue()						{ return _sValue; };
Index: snippets/plugin_katesnippets.h
===================================================================
--- snippets/plugin_katesnippets.h	(revision 632021)
+++ snippets/plugin_katesnippets.h	(working copy)
@@ -62,7 +62,7 @@
   Q_OBJECT
 
 public:
-  KatePluginSnippets( QObject* parent = 0, const QStringList& = QStringList() );
+  explicit KatePluginSnippets( QObject* parent = 0, const QStringList& = \
QStringList() );  virtual ~KatePluginSnippets();
 
   void addView (Kate::MainWindow *win);
Index: kpybrowser/pybrowse_part.cpp
===================================================================
--- kpybrowser/pybrowse_part.cpp	(revision 632021)
+++ kpybrowser/pybrowse_part.cpp	(working copy)
@@ -65,7 +65,7 @@
 }
 
 
-void PluginViewPyBrowse::slotSelected(QString name, int line)
+void PluginViewPyBrowse::slotSelected(const QString &name, int line)
 {
   //TO DO - deal with setting the active view to be the file that has this class
   //if multiple files are open.
Index: kpybrowser/pybrowse_part.h
===================================================================
--- kpybrowser/pybrowse_part.h	(revision 632021)
+++ kpybrowser/pybrowse_part.h	(working copy)
@@ -41,12 +41,12 @@
   friend class KatePluginPyBrowse;
 
   public:
-    PluginViewPyBrowse (Kate::MainWindow *w);
+    explicit PluginViewPyBrowse (Kate::MainWindow *w);
     ~PluginViewPyBrowse ();
 
   public slots:
     void slotShowPyBrowser();
-    void slotSelected(QString name, int line);
+    void slotSelected( const QString &name, int line);
     void slotUpdatePyBrowser();
 
   private:
@@ -60,7 +60,7 @@
   Q_OBJECT
 
   public:
-    KatePluginPyBrowse( QObject* parent = 0, const QStringList& = QStringList() );
+    explicit KatePluginPyBrowse( QObject* parent = 0, const QStringList& = \
QStringList() );  ~KatePluginPyBrowse();
 
     void addView(Kate::MainWindow *win);
Index: kpybrowser/kpybrowser.cpp
===================================================================
--- kpybrowser/kpybrowser.cpp	(revision 632021)
+++ kpybrowser/kpybrowser.cpp	(working copy)
@@ -246,7 +246,7 @@
   QRegExp method_rx (QString ("[\\s]+def [a-zA-Z_]+[^#]*:"));
 
   int paren_i;
-  QStringList lines = QStringList::split ("\n", pytext, TRUE);
+  QStringList lines = QStringList::split ("\n", pytext, true);
   QStringList::Iterator iter;
   QString *line;
   QString class_name, method_name, function_name, class_sig, method_sig,
Index: kpybrowser/kpybrowser.h
===================================================================
--- kpybrowser/kpybrowser.h	(revision 632021)
+++ kpybrowser/kpybrowser.h	(working copy)
@@ -32,7 +32,7 @@
   Q_OBJECT
   public:
     /** construtor */
-    KPyBrowser(QWidget* parent=0, const char *name=0);
+    explicit KPyBrowser(QWidget* parent=0, const char *name=0);
     /** destructor */
     ~KPyBrowser();
     void parseText(QString &pytext);
Index: openheader/plugin_kateopenheader.h
===================================================================
--- openheader/plugin_kateopenheader.h	(revision 632021)
+++ openheader/plugin_kateopenheader.h	(working copy)
@@ -28,7 +28,7 @@
   Q_OBJECT
 
   public:
-    PluginKateOpenHeader( QObject* parent = 0, const QStringList& = QStringList() );
+    explicit PluginKateOpenHeader( QObject* parent = 0, const QStringList& = \
QStringList() );  virtual ~PluginKateOpenHeader();
 
     void addView (Kate::MainWindow *win);
Index: openheader/plugin_kateopenheader.cpp
===================================================================
--- openheader/plugin_kateopenheader.cpp	(revision 632021)
+++ openheader/plugin_kateopenheader.cpp	(working copy)
@@ -137,10 +137,10 @@
   QString basename = QFileInfo( url.path() ).baseName();
   KUrl newURL( url );
   for( QStringList::ConstIterator it = extensions.begin(); it != extensions.end(); \
                ++it ) {
-    newURL.setFileName( basename + "." + *it );
+    newURL.setFileName( basename + '.' + *it );
     if( KIO::NetAccess::exists( newURL , true, \
application()->activeMainWindow()->window()) )  \
                application()->activeMainWindow()->openUrl( newURL );
-    newURL.setFileName( basename + "." + (*it).toUpper() );
+    newURL.setFileName( basename + '.' + (*it).toUpper() );
     if( KIO::NetAccess::exists( newURL , true, \
application()->activeMainWindow()->window()) )  \
application()->activeMainWindow()->openUrl( newURL );  }
Index: helloworld/plugin_katehelloworld.h
===================================================================
--- helloworld/plugin_katehelloworld.h	(revision 632021)
+++ helloworld/plugin_katehelloworld.h	(working copy)
@@ -15,7 +15,7 @@
   Q_OBJECT
 
   public:
-    KatePluginHelloWorld( QObject* parent = 0, const QStringList& = QStringList() );
+    explicit KatePluginHelloWorld( QObject* parent = 0, const QStringList& = \
QStringList() );  virtual ~KatePluginHelloWorld();
 
     void storeGeneralConfig(KConfig* config,const QString& groupPrefix);
Index: make/plugin_katemake.cpp
===================================================================
--- make/plugin_katemake.cpp	(revision 632021)
+++ make/plugin_katemake.cpp	(working copy)
@@ -637,7 +637,7 @@
 	doc->save();
 	KUrl url(doc->url());
 
-	output_line = QString::null;
+	output_line = QString();
 	ErrorMessage::resetSerial();
 	found_error=false;
 
Index: make/plugin_katemake.h
===================================================================
--- make/plugin_katemake.h	(revision 632021)
+++ make/plugin_katemake.h	(working copy)
@@ -94,7 +94,7 @@
   Q_OBJECT
 
   public:
-	PluginKateMake( QObject* parent = 0, const char* name = 0, const QStringList& = \
QStringList() ); +	explicit PluginKateMake( QObject* parent = 0, const char* name = \
0, const QStringList& = QStringList() );  virtual ~PluginKateMake();
 
 	void addView (Kate::MainWindow *win);



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic