Mercurial > projects > qtd
changeset 207:71101646ab25
more D2 examples fixes
author | SokoL_SD |
---|---|
date | Tue, 14 Jul 2009 09:25:04 +0000 |
parents | aeeaae4dd540 |
children | be08f1b4ba39 |
files | examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.d examples/itemviews/dirview/main.d examples/opengl/hellogl/glwidget.d examples/opengl/hellogl/main.d |
diffstat | 4 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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);
--- 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;