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

List:       kde-devel
Subject:    kdelibs4: Explicit creators
From:       "Will Entriken" <kde.org () phor ! net>
Date:       2006-09-09 16:51:43
Message-ID: c0be00e90609090951i20fb6db2s47f4d40e6602e458 () mail ! gmail ! com
[Download RAW message or body]

I'm working on the kdelibs4 todo item: make ctors explicit. To do this, I apply:

===================================================================
--- kdeui/kguiitem.h    (revision 582197)
+++ kdeui/kguiitem.h    (working copy)
@@ -44,7 +44,7 @@
     // subtle bugs otherwise - the icon name, tooltip and whatsthis text
     // get changed behind your back if you do 'setButtonFoo( "Bar" );'
     // It gives the wrong impression that you just change the text.
-    KGuiItem( const QString &text,
+    explicit KGuiItem( const QString &text,
               const QString &iconName  = QString(),
               const QString &toolTip   = QString(),
               const QString &whatsThis = QString() );

And then try to build all the kde4 source code. When I get an error like this:

[snip]: In member function 'void KrashDebugger::slotSave()':
[snip]:135: error: no matching function for call to
'KMessageBox::warningContinueCancel(int, QString, QString, QString)'
[snip]: note: candidates are: static int
KMessageBox::warningContinueCancel(QWidget*, const QString&, const
QString&, const KGuiItem&, const QString&,
QFlags<KMessageBox::Option>)

I make a simple change like this:

===================================================================
--- [snip]  (revision 582509)
+++ [snip]  (working copy)
@@ -132,7 +132,7 @@
        if (KMessageBox::Cancel ==
             KMessageBox::warningContinueCancel( 0,
               i18n( "A file named \"%1\" already exists. "
                     "Are you sure you want to overwrite it?", filename ),
               i18n( "Overwrite File?" ),
-              i18n( "&Overwrite" ) ))
+              KGuiItem( i18n( "&Overwrite" ) ) ))
             return;
       }

When the code compiles with no errors like that, I am done.

This is my progress:

 kdeaccessibility/
 kdeaddons/
 kdeadmin/
 kdeartwork/
 kdebase/ - STARTED
 kdebindings/
 kdeedu/
 kdegames/
 kdegraphics/
 kdelibs/ - DONE
 kdemultimedia/
 kdenetwork/
 kdepim/
 kdepimlibs/
 kdesdk/
 kdetoys/
 kdeutils/
 kdevelop/
 kdewebdev/

I have tried to make a sed script that takes the g++ error output and
generates a patch - and have been unsuccessful. So I realize this will
take a lot of man hours to complete. This is great project for someone
beginning with development and want to make a contribution. Please let
me know if you'd like to help by working on any of these parts.

Thanks,
Will Entriken

http://websvn.kde.org/trunk/KDE/kdelibs/TODO?rev=568559&view=auto
 
>> 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