diff examples/mainwindows/dockwidgets/mainwindow.d @ 282:256ab6cb8e85

Signals look-up andNew syntax for connect. The old one will not work from now on. This will allow for the signals overload. Although changes are done for both D1 and D2 versions, D1 won't work because of compiler bugs. I am tired of waiting for fixes.
author eldar
date Fri, 16 Oct 2009 02:43:59 +0000
parents 8aaa84d48451
children 7a3c43424dca
line wrap: on
line diff
--- a/examples/mainwindows/dockwidgets/mainwindow.d	Sun Oct 11 05:23:41 2009 +0000
+++ b/examples/mainwindows/dockwidgets/mainwindow.d	Fri Oct 16 02:43:59 2009 +0000
@@ -214,7 +214,7 @@
             newLetterAct = new QAction(new QIcon(":images/new.png"), tr("&New Letter"), this);
             newLetterAct.setShortcut(tr("Ctrl+N"));
             newLetterAct.setStatusTip(tr("Create a new form letter"));
-            newLetterAct.triggered.connect(&this.newLetter);
+            connect!("triggered")(newLetterAct, &this.newLetter);
 
             saveAct = new QAction(new QIcon(":images/save.png"), tr("&Save..."), this);
             saveAct.setShortcut(tr("Ctrl+S"));
@@ -229,16 +229,16 @@
             undoAct = new QAction(new QIcon(":images/undo.png"), tr("&Undo"), this);
             undoAct.setShortcut(tr("Ctrl+Z"));
             undoAct.setStatusTip(tr("Undo the last editing action"));
-            undoAct.triggered.connect(&undo);
+            connect!("triggered")(undoAct, &undo);
 
             quitAct = new QAction(tr("&Quit"), this);
             quitAct.setShortcut(tr("Ctrl+Q"));
             quitAct.setStatusTip(tr("Quit the application"));
-            quitAct.triggered.connect(&this.close);
+            connect!("triggered")(quitAct, &this.close);
 
             aboutAct = new QAction(tr("&About"), this);
             aboutAct.setStatusTip(tr("Show the application's About box"));
-            aboutAct.triggered.connect(&about);
+            connect!("triggered")(aboutAct, &about);
 
             aboutQtAct = new QAction(tr("About &Qt"), this);
             aboutQtAct.setStatusTip(tr("Show the Qt library's About box"));
@@ -327,8 +327,8 @@
             addDockWidget(Qt.RightDockWidgetArea, dock);
             viewMenu.addAction(dock.toggleViewAction());
 
-            customerList.currentTextChanged.connect(&this.insertCustomer);
-            paragraphsList.currentTextChanged.connect(&this.addParagraph);
+            connect!("currentTextChanged")(customerList, &this.insertCustomer);
+            connect!("currentTextChanged")(paragraphsList, &this.addParagraph);
         }
 
         QTextEdit textEdit;