summaryrefslogtreecommitdiffstats
path: root/kdeui/tests/kmainwindowrestoretest.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch)
tree5ac38a06f3dde268dc7927dc155896926aaf7012 /kdeui/tests/kmainwindowrestoretest.cpp
downloadtdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz
tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/tests/kmainwindowrestoretest.cpp')
-rw-r--r--kdeui/tests/kmainwindowrestoretest.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/kdeui/tests/kmainwindowrestoretest.cpp b/kdeui/tests/kmainwindowrestoretest.cpp
new file mode 100644
index 000000000..35198a6c2
--- /dev/null
+++ b/kdeui/tests/kmainwindowrestoretest.cpp
@@ -0,0 +1,41 @@
+
+#include "kmainwindowrestoretest.h"
+
+#include <kapplication.h>
+
+#include <qlabel.h>
+
+#define MAKE_WINDOW( kind, title ) do { \
+ MainWin##kind * m = new MainWin##kind; \
+ m->setCaption( title ); \
+ m->setCentralWidget( new QLabel( title, m ) ); \
+ m->show(); \
+} while ( false )
+
+int main( int argc, char * argv[] ) {
+
+ KApplication app( argc, argv, "kmainwindowrestoretest" );
+
+ if ( kapp->isRestored() ) {
+ kRestoreMainWindows< MainWin1, MainWin2, MainWin3 >();
+ kRestoreMainWindows< MainWin4, MainWin5 >();
+ RESTORE(MainWin6);
+ //kRestoreMainWindows< MainWin6 >(); // should be equivalent to RESTORE()
+ } else {
+ MAKE_WINDOW( 1, "First 1" );
+ MAKE_WINDOW( 1, "Second 1" );
+ MAKE_WINDOW( 2, "Only 2" );
+ MAKE_WINDOW( 3, "First 3" );
+ MAKE_WINDOW( 4, "First 4" );
+ MAKE_WINDOW( 4, "Second 4" );
+ MAKE_WINDOW( 3, "Second 3" );
+ MAKE_WINDOW( 4, "Third 4" );
+ MAKE_WINDOW( 5, "First 5" );
+ MAKE_WINDOW( 5, "Second 5" );
+ MAKE_WINDOW( 1, "Only 6" );
+ }
+
+ return app.exec();
+}
+
+#include "kmainwindowrestoretest.moc"