Browse Source

Disable debugging and informational messages from libti*.

git-svn-id: file:///var/svn/tigccpp/trunk@925 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 17 years ago
parent
commit
355b564376
2 changed files with 20 additions and 2 deletions
  1. 2 1
      ktigcc/NEWS
  2. 18 1
      ktigcc/ktigcc.cpp

+ 2 - 1
ktigcc/NEWS

@@ -1,6 +1,6 @@
 This is a summary of the changes in KTIGCC since the first alpha release:
 
-CVS HEAD (2006-11-23):
+KTIGCC 1.06 (2006-11-25):
 
 * Added Anjuta 2 project, removed Anjuta 1 project.
 * Fixed missing layout in the Operating System tab of the Program Options
@@ -13,6 +13,7 @@ CVS HEAD (2006-11-23):
 * Ctrl+Tab/Ctrl+G now skips the project root and the categories.
 * When saving a project for the first time, if it is still named "Project1", a
   name based on the .tpr file name is now set (as in TIGCC IDE).
+* Disabled debugging and informational messages from libti*.
 
 
 KTIGCC 1.05 (2006-10-24):

+ 18 - 1
ktigcc/ktigcc.cpp

@@ -35,6 +35,7 @@
 #include <kicontheme.h>
 #include <kiconloader.h>
 #include <kconfig.h>
+#include <glib.h>
 #include "mainform.h"
 using namespace std;
 void qCleanupImages_ktigcc();
@@ -55,7 +56,15 @@ KConfig *pconfig;
 KAboutData *pabout;
 const char *parg;
 
-int main( int argc, char *argv[] )
+static void log_eater(const gchar *log_domain __attribute__((unused)),
+                      GLogLevelFlags log_level __attribute__((unused)),
+                      const gchar *message __attribute__((unused)),
+                      gpointer user_data __attribute__((unused)))
+{
+  // Do nothing.
+}
+
+int main(int argc, char *argv[])
 {
   // Match the locale for the default C string <-> QString conversions.
   // Hopefully it is a .UTF-8 locale, if it isn't, don't complain about
@@ -142,6 +151,14 @@ int main( int argc, char *argv[] )
   else
     parg=NULL;
 
+  // Keep the tilibs from spamming the console with INFO messages.
+  g_log_set_handler("ticables",(GLogLevelFlags)(G_LOG_LEVEL_INFO|G_LOG_LEVEL_DEBUG),
+                    log_eater,NULL);
+  g_log_set_handler("tifiles",(GLogLevelFlags)(G_LOG_LEVEL_INFO|G_LOG_LEVEL_DEBUG),
+                    log_eater,NULL);
+  g_log_set_handler("ticalcs",(GLogLevelFlags)(G_LOG_LEVEL_INFO|G_LOG_LEVEL_DEBUG),
+                    log_eater,NULL);
+
   MainForm mainForm;
   app.setMainWidget( &mainForm );
   mainForm.show();