changeset 191:a212c97edcd2

one more example
author eldar
date Sun, 12 Jul 2009 21:03:57 +0000
parents a1b48a630f73
children 1d272f0bfefa
files examples/mainwindows/dockwidgets/build.sh examples/mainwindows/dockwidgets/main.d examples/mainwindows/dockwidgets/mainwindow.d qt/QGlobal.d qt/QGlobal.d.inc
diffstat 5 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/examples/mainwindows/dockwidgets/build.sh	Sun Jul 12 20:51:37 2009 +0000
+++ b/examples/mainwindows/dockwidgets/build.sh	Sun Jul 12 21:03:57 2009 +0000
@@ -1,4 +1,4 @@
 #! /bin/bash
 #rcc mainwindow.qrc -o mainwindow_rcc.cpp
 #g++ -c -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/X11R6/include mainwindow_rcc.cpp
-dmd main.d mainwindow.d -I../../../ -I../../../qt/d1 -L-L../../../lib -L-lqtdgui -L-lqtdcore -L-lQtCore -L-lQtGui -ofdockwidgets
+dmd main.d mainwindow.d -I../../../ -I../../../qt/d2 -L-L../../../lib -L-lqtdgui -L-lqtdcore -L-lQtCore -L-lQtGui -ofdockwidgets
--- a/examples/mainwindows/dockwidgets/main.d	Sun Jul 12 20:51:37 2009 +0000
+++ b/examples/mainwindows/dockwidgets/main.d	Sun Jul 12 21:03:57 2009 +0000
@@ -39,7 +39,7 @@
 import mainwindow;
 
 
-int main(char[][] args)
+int main(string[] args)
 {
     scope app = new QApplication(args);
     scope mainWin = new MainWindow;
--- a/examples/mainwindows/dockwidgets/mainwindow.d	Sun Jul 12 20:51:37 2009 +0000
+++ b/examples/mainwindows/dockwidgets/mainwindow.d	Sun Jul 12 21:03:57 2009 +0000
@@ -63,8 +63,10 @@
 import qt.gui.
 import qt.gui.
 */
-import tango.text.Util;
-import tango.io.Stdout;
+version(Tango)
+    import tango.text.Util;
+else
+    import std.string;
 
 class MainWindow : public QMainWindow
 {
@@ -162,11 +164,12 @@
             document.undo();
         }
 
-        void insertCustomer(char[] customer)
+        void insertCustomer(string customer)
         {
             if (customer == "")
                 return;
-            char[][] customerList = customer.split(", ");
+            
+            string[] customerList = customer.split(", ");
             auto document = textEdit.document();
             QTextCursor cursor = document.find("NAME");
             if (!cursor.isNull) {
@@ -186,7 +189,7 @@
             }
         }
 
-        void addParagraph(char[] paragraph)
+        void addParagraph(string paragraph)
         {
             if (paragraph == "")
                 return;
--- a/qt/QGlobal.d	Sun Jul 12 20:51:37 2009 +0000
+++ b/qt/QGlobal.d	Sun Jul 12 21:03:57 2009 +0000
@@ -44,7 +44,7 @@
     }
 }
 
-char[] tr(char[] arg) {
+string tr(string arg) {
     return arg;
 }
 
--- a/qt/QGlobal.d.inc	Sun Jul 12 20:51:37 2009 +0000
+++ b/qt/QGlobal.d.inc	Sun Jul 12 21:03:57 2009 +0000
@@ -44,7 +44,7 @@
     }
 }
 
-char[] tr(char[] arg) {
+string tr(string arg) {
     return arg;
 }