messages.cpp: use append(...) and not setText( text() + ...), seems to
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Thu, 10 Oct 2002 19:34:06 +0000 (19:34 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Thu, 10 Oct 2002 19:34:06 +0000 (19:34 +0000)
decrease cpu-usage considerably.
 preferences.cpp: allow config strings to be 40 characters long instead of
10. Is that enough?

modules/gui/kde/messages.cpp
modules/gui/kde/preferences.cpp

index f2107bf..caa8329 100644 (file)
@@ -61,7 +61,9 @@ void KMessagesWindow::update()
              i_start != i_stop;
              i_start = (i_start+1) % VLC_MSG_QSIZE )
         {
-            text->setText( text->text() + QString(p_msg->p_msg[i_start].psz_module) + ppsz_type[p_msg->p_msg[i_start].i_type] + p_msg->p_msg[i_start].psz_msg + "<br>");
+            text->append( QString(p_msg->p_msg[i_start].psz_module) +
+                          ppsz_type[p_msg->p_msg[i_start].i_type] +
+                          p_msg->p_msg[i_start].psz_msg + "<br>");
             
 //             /* Append all messages to log window */
 //             gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray,
index af69b19..8633b85 100644 (file)
@@ -2,7 +2,7 @@
  * preferences.cpp: preferences window for the kde gui
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: preferences.cpp,v 1.5 2002/10/03 10:15:01 sigmunau Exp $
+ * $Id: preferences.cpp,v 1.6 2002/10/10 19:34:06 sigmunau Exp $
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> Mon Aug 12 2002
  *
@@ -166,7 +166,7 @@ KPreferences::KPreferences(intf_thread_t *p_intf, const char *psz_module_name,
                 connect(kl, SIGNAL(textChanged ( const QString & )),
                         ci, SLOT(setValue( const QString &)));
                 QToolTip::add(kl, p_item->psz_longtext);
-                kl->setMaxLength(10);
+                kl->setMaxLength(40);
                 
                 vlc_mutex_unlock( p_item->p_lock );