[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeadmin/ksysv
From:       Toshitaka Fujioka <toshitaka () crux ! ocn ! ne ! jp>
Date:       2003-07-21 14:08:18
[Download RAW message or body]

CVS commit by fujioka: 

* changed from QTextView to QTextEdit.
* fix i18n problem.
* works restart command.


  M +8 -6      OldView.cpp   1.116
  M +4 -4      OldView.h   1.40


--- kdeadmin/ksysv/OldView.cpp  #1.115:1.116
@@ -31,5 +31,5 @@
 #include <qaccel.h>
 #include <qscrollbar.h>
-#include <qtextview.h>
+#include <qtextedit.h>
 #include <qcstring.h>
 #include <qclipboard.h>
@@ -310,5 +310,7 @@ void KSVContent::initLList()
 
   // add text-diplay widget
-  textDisplay = new QTextView (QString::null, QString::null, this, "TextDisplayWidget");
+  textDisplay = new QTextEdit( QString::null, QString::null, this, "TextDisplayWidget" );
+  textDisplay->setTextFormat( Qt::RichText );
+  textDisplay->setReadOnly( true );
 
   for (int i = 0; i < ksv::runlevelNumber; ++i)
@@ -669,9 +671,9 @@ void KSVContent::restartService ()
 void KSVContent::restartService (const QString& path)
 {
-  // stopping
+  // restarting
   KProcess *_proc = new KProcess();
   _proc->clearArguments();
 
-  *_proc << path << "stop";
+  *_proc << path << "restart";
 
   connect(_proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotExitDuringRestart(KProcess*)));
@@ -693,5 +695,5 @@ void KSVContent::slotOutput( KProcess*, 
     QCString buffer = QCString( _buffer, _buflen + 1 );
     buffer[_buflen]='\0';
-    appendLog(buffer, buffer);
+    appendLog( QString::fromLocal8Bit( buffer ), QString::fromLocal8Bit( buffer ) );
   }
 }
@@ -701,5 +703,5 @@ void KSVContent::slotErr( KProcess*, cha
     QCString buffer = QCString( _buffer, _buflen + 1);
     buffer[_buflen]='\0';
-    appendLog(buffer, buffer);
+    appendLog( QString::fromLocal8Bit( buffer ), QString::fromLocal8Bit( buffer ) );
   }
 }

--- kdeadmin/ksysv/OldView.h  #1.39:1.40
@@ -28,5 +28,5 @@ class QFileInfo;
 class QLabel;
 class QListViewItem;
-class QTextView;
+class QTextEdit;
 class QFrame;
 class QVBox;
@@ -160,5 +160,5 @@ private:
   KPopupMenu* mScriptMenu;
   KSVTrash* trash;
-  QTextView* textDisplay;
+  QTextEdit* textDisplay;
   KSVConfig* conf;
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic