]> git.cworth.org Git - vogl/blobdiff - src/vogleditor/vogleditor_output.cpp
UI: Update vogleditor_output so that it can be used from other files without having...
[vogl] / src / vogleditor / vogleditor_output.cpp
index c96a06dc8420cab88ca414f3518409863d5b35f0..0c08f18f8864934daa1f7345719f98f4999e0f33 100644 (file)
@@ -1,6 +1,8 @@
 #include "vogleditor_output.h"
 #include <QTextEdit>
 
+vogleditor_output gs_OUTPUT;
+
 vogleditor_output::vogleditor_output()
 {
 }
@@ -21,17 +23,16 @@ void vogleditor_output::warning(const char* pWarning)
 {
     if (m_pTextEdit != NULL)
     {
-        m_pTextEdit->append("Warning: ");
-        m_pTextEdit->append(pWarning);
+        QString msg = QString("Warning: %1").arg(pWarning);
+        m_pTextEdit->append(msg);
     }
 }
 
-
 void vogleditor_output::error(const char* pError)
 {
     if (m_pTextEdit != NULL)
     {
-        m_pTextEdit->append("ERROR: ");
-        m_pTextEdit->append(pError);
+        QString msg = QString("ERROR: %1").arg(pError);
+        m_pTextEdit->append(msg);
     }
 }