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

List:       kde-commits
Subject:    kdelibs/kdeui/tests
From:       David Faure <faure () kde ! org>
Date:       2005-03-16 21:32:46
Message-ID: 20050316213246.805A017D06 () office ! kde ! org
[Download RAW message or body]

CVS commit by faure: 

.h files make it easier to add slots. This is a test for an alleged bug reported
by jstaniek ("Alt+Key_1 inserts 1 into lineedit"), but he's wrong, it works fine (on \
x11 at least)


  A            kxmlguitest.h   1.1 [no copyright]
  M +12 -9     kxmlguitest.cpp   1.6


--- kdelibs/kdeui/tests/kxmlguitest.cpp  #1.5:1.6
@@ -1,3 +1,3 @@
-
+#include "kxmlguitest.h"
 #include <kapplication.h>
 #include <kmainwindow.h>
@@ -6,16 +6,14 @@
 #include <kxmlguibuilder.h>
 #include <kaction.h>
+#include <kdebug.h>
 #include <kstdaction.h>
 #include <kstandarddirs.h>
+#include <qlineedit.h>
 #include <qdir.h>
 
-class Client : public KXMLGUIClient
+void Client::slotSec()
 {
-public:
-    Client() {}
-
-    void setXMLFile( const QString &f, bool merge = true ) { \
                KXMLGUIClient::setXMLFile( f, merge ); }
-    void setInstance( KInstance *inst ) { KXMLGUIClient::setInstance( inst ); }
-};
+    kdDebug() << "Client::slotSec()" << endl;
+}
 
 int main( int argc, char **argv )
@@ -28,4 +26,8 @@ int main( int argc, char **argv )
 
     KMainWindow *mainwindow = new KMainWindow;
+
+    QLineEdit* line = new QLineEdit( mainwindow );
+    mainwindow->setCentralWidget( line );
+
     mainwindow->show();
 
@@ -47,5 +49,5 @@ int main( int argc, char **argv )
 
     (void)new KAction( "decfont", "viewmag-", 0, 0, 0, part->actionCollection(), \
                "decFontSizes" );
-    (void)new KAction( "sec", "unlock", 0, 0, 0, part->actionCollection(), \
"security" ); +    (void)new KAction( "sec", "unlock", Qt::ALT + Qt::Key_1, part, \
SLOT( slotSec() ), part->actionCollection(), "security" );  
     part->setXMLFile( "./kxmlguitest_part.rc" );
@@ -60,2 +62,3 @@ int main( int argc, char **argv )
     return app.exec();
 }
+#include "kxmlguitest.moc"


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

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