Mercurial > projects > qtd
comparison examples/desktop/systray/main.d @ 350:31520b2c0b3c
Removed dependency on parent trait and stringof
author | Max Samukha <maxter@spambox.com> |
---|---|
date | Thu, 20 May 2010 15:49:08 +0300 |
parents | 3ea0efe4d31e |
children |
comparison
equal
deleted
inserted
replaced
349:925386e0e780 | 350:31520b2c0b3c |
---|---|
38 ** $QT_END_LICENSE$ | 38 ** $QT_END_LICENSE$ |
39 ** | 39 ** |
40 ****************************************************************************/ | 40 ****************************************************************************/ |
41 module main; | 41 module main; |
42 | 42 |
43 import std.stdio; // BUG: needed to workaround std.stdio initialization failure | |
43 | 44 |
44 import qt.gui.QMessageBox; | 45 import qt.gui.QMessageBox; |
45 import qt.gui.QApplication; | 46 import qt.gui.QApplication; |
46 import qt.gui.QSystemTrayIcon; | 47 import qt.gui.QSystemTrayIcon; |
47 | 48 |
48 import window; | 49 import window; |
49 | 50 |
50 | 51 |
51 int main(string[] args) | 52 int main(string[] args) |
52 { | 53 { |
53 auto app = new QApplication(args); | 54 auto app = new QApplication(args); |
54 | 55 |
55 if (!QSystemTrayIcon.isSystemTrayAvailable()) { | 56 if (!QSystemTrayIcon.isSystemTrayAvailable()) { |
56 QMessageBox.critical(null, tr("Systray"), tr("I couldn't detect any system tray on this system.")); | 57 QMessageBox.critical(null, tr("Systray"), tr("I couldn't detect any system tray on this system.")); |
57 return 1; | 58 return 1; |
58 } | 59 } |
59 QApplication.setQuitOnLastWindowClosed(false); | 60 QApplication.setQuitOnLastWindowClosed(false); |
60 | 61 |
61 auto window = new Window; | 62 auto window = new Window; |
62 window.show(); | 63 window.show(); |
63 return app.exec(); | 64 return app.exec(); |
64 } | 65 } |