summaryrefslogtreecommitdiff
path: root/devel/kdevelop-base/patches/patch-aj
blob: 2c8d4b6e0bbba805db4fa2e7b6d5ef8469d907c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$NetBSD: patch-aj,v 1.1 2007/05/23 13:52:58 markd Exp $

Fix from svn.

diff -u -u kdevelop-3.4.1/languages/cpp/cppsupportpart.cpp kdevelop-svn/languages/cpp/cppsupportpart.cpp
--- kdevelop-3.4.1/languages/cpp/cppsupportpart.cpp	2007-05-16 16:36:20.000000000 +0200
+++ languages/cpp/cppsupportpart.cpp	2007-05-16 00:25:57.000000000 +0200
@@ -3130,11 +3130,11 @@
         return QString::null;
 }
 
-UIBlockTester::UIBlockTesterThread::UIBlockTesterThread( UIBlockTester& parent ) : QThread(), m_parent( parent ) {
+UIBlockTester::UIBlockTesterThread::UIBlockTesterThread( UIBlockTester& parent ) : QThread(), m_parent( parent ), m_stop(false) {
 }
       
 void UIBlockTester::UIBlockTesterThread::run() {
-  while(1) {
+  while(!m_stop) {
 	  msleep( m_parent.m_msecs / 10 );
 	  m_parent.m_timeMutex.lock();
 	  QDateTime t = QDateTime::currentDateTime();
@@ -3146,7 +3146,11 @@
 	  m_parent.m_timeMutex.unlock();
   }
 }
-      
+
+void UIBlockTester::UIBlockTesterThread::stop() {
+	m_stop = true;
+}
+
 UIBlockTester::UIBlockTester( uint milliseconds ) : m_thread( *this ), m_msecs( milliseconds ) {
 	m_timer = new QTimer( this );
 	m_timer->start( milliseconds/10 );
@@ -3155,7 +3159,7 @@
 	m_thread.start();
 }
 UIBlockTester::~UIBlockTester() {
-  m_thread.terminate();
+  m_thread.stop();
   m_thread.wait();
 }