diff -r 7a562bf3d829 -r 3fcccd8c3357 src/main.cpp --- a/src/main.cpp Fri Jun 14 16:00:54 2013 +0300 +++ b/src/main.cpp Fri Jun 14 19:34:30 2013 +0300 @@ -20,6 +20,7 @@ #include #include #include +#include #include "gui.h" #include "file.h" #include "bbox.h" @@ -33,14 +34,15 @@ ForgeWindow* g_win = null; bbox g_BBox; const QApplication* g_app = null; -QFile g_file_stdout, g_file_stderr; +File g_file_stdout (stdout, File::Write); +File g_file_stderr (stderr, File::Write); const vertex g_origin (0.0f, 0.0f, 0.0f); const matrix g_identity ({1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f}); -void doPrint (QFile& f, initlist args) { +void doPrint (File& f, initlist args) { str msg = DoFormat (args); - f.write (msg.toUtf8 (), msg.length ()); + f.write (msg.toUtf8 ()); f.flush (); } @@ -57,12 +59,9 @@ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ============================================================================= int main (int argc, char* argv[]) { - g_file_stdout.open (stdout, QIODevice::WriteOnly); - g_file_stderr.open (stderr, QIODevice::WriteOnly); - const QApplication app (argc, argv); g_app = &app; - g_curfile = NULL; + g_curfile = null; // Load or create the configuration if (!config::load ()) {