From 2b15f624bc9ffca761c40b7eb41900e5d6b2e169 Mon Sep 17 00:00:00 2001
From: Sigmund Augdal Helberg <sigmunau@videolan.org>
Date: Thu, 10 Oct 2002 19:34:06 +0000
Subject: [PATCH]  messages.cpp: use append(...) and not setText( text() +
 ...), seems to 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    | 4 +++-
 modules/gui/kde/preferences.cpp | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/gui/kde/messages.cpp b/modules/gui/kde/messages.cpp
index f2107bf5077e..caa8329fa36a 100644
--- a/modules/gui/kde/messages.cpp
+++ b/modules/gui/kde/messages.cpp
@@ -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,
diff --git a/modules/gui/kde/preferences.cpp b/modules/gui/kde/preferences.cpp
index af69b19da5b2..8633b85def14 100644
--- a/modules/gui/kde/preferences.cpp
+++ b/modules/gui/kde/preferences.cpp
@@ -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 );
                 
-- 
GitLab