# HG changeset patch # User SokoL_SD # Date 1247563504 0 # Node ID 71101646ab251196b9c94485e7457c445846b221 # Parent aeeaae4dd54047c650e065882251ce1c85dea74f more D2 examples fixes diff -r aeeaae4dd540 -r 71101646ab25 examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.d --- a/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.d Tue Jul 14 09:13:27 2009 +0000 +++ b/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.d Tue Jul 14 09:25:04 2009 +0000 @@ -88,7 +88,7 @@ QModelIndex index1 = sourceModel().index(sourceRow, 1, sourceParent); QModelIndex index2 = sourceModel().index(sourceRow, 2, sourceParent); - static bool contains(char[] str, QRegExp rx1) + static bool contains(string str, QRegExp rx1) { auto rx2 = new QRegExp(rx1); return (rx2.indexIn(str, 0) != -1); diff -r aeeaae4dd540 -r 71101646ab25 examples/itemviews/dirview/main.d --- a/examples/itemviews/dirview/main.d Tue Jul 14 09:13:27 2009 +0000 +++ b/examples/itemviews/dirview/main.d Tue Jul 14 09:25:04 2009 +0000 @@ -39,7 +39,7 @@ import qt.gui.QDirModel; import qt.gui.QTreeView; -int main(char[][] args) +int main(string[] args) { scope app = new QApplication(args); diff -r aeeaae4dd540 -r 71101646ab25 examples/opengl/hellogl/glwidget.d --- a/examples/opengl/hellogl/glwidget.d Tue Jul 14 09:13:27 2009 +0000 +++ b/examples/opengl/hellogl/glwidget.d Tue Jul 14 09:25:04 2009 +0000 @@ -35,8 +35,16 @@ ** ****************************************************************************/ - -import tango.math.Math; +version(Tango) + import tango.math.Math; +else +{ + import std.math; + int rndint(real x) + { + return cast(int)rndtol(x); + } +} import qt.core.QPoint; import qt.gui.QMouseEvent; diff -r aeeaae4dd540 -r 71101646ab25 examples/opengl/hellogl/main.d --- a/examples/opengl/hellogl/main.d Tue Jul 14 09:13:27 2009 +0000 +++ b/examples/opengl/hellogl/main.d Tue Jul 14 09:25:04 2009 +0000 @@ -39,7 +39,7 @@ import window; -int main(char[][] args) +int main(string[] args) { scope app = new QApplication(args); scope window = new Window;