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

List:       kde-commits
Subject:    branches/kdepim/enterprise4/kdelibs-4.0.83/kdeui/kernel
From:       Jaroslaw Staniek <js () iidea ! pl>
Date:       2008-07-03 21:23:53
Message-ID: 1215120233.199826.31446.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 827828 by staniek:

Windows:
remove need for bstr_t, and thus for com{def|util}.h

merged with trunk change r827827

Thanks, Frank.



 M  +4 -11     kapplication_win.cpp  


--- branches/kdepim/enterprise4/kdelibs-4.0.83/kdeui/kernel/kapplication_win.cpp #827827:827828
@@ -53,12 +53,6 @@
 // <copy of kdepim/libkdepim/utils.cpp, TODO: move to a shared helper library>
 
 #include <windows.h>
-#ifdef _MSC_VER
-# include <comdef.h> // (bstr_t)
-#else
-// mingw: get patched comutil.h from http://pastebin.ca/raw/1060471 and save to kde4/mingw/include/
-# include <comutil.h> // (bstr_t)
-#endif
 #include <winperf.h>
 #include <psapi.h>
 #include <signal.h>
@@ -152,15 +146,14 @@
     pids.clear();
     perfCounter = FirstCounter( perfObject );
     perfInstance = FirstInstance( perfObject );
-    _bstr_t bstrProcessName;
     // retrieve the instances
     qDebug() << "INSTANCES: " << perfObject->NumInstances;
     for( int instance = 0; instance < perfObject->NumInstances; instance++ ) {
       curCounter = perfCounter;
-
-      bstrProcessName = (wchar_t *)((PBYTE)perfInstance + perfInstance->NameOffset);
-      qDebug() << "bstrProcessName: " << fromWChar((LPCWSTR)bstrProcessName);
-      if (fromWChar((LPCWSTR)bstrProcessName) == processName) {
+      const QString foundProcessName( 
+        fromWChar( (wchar_t *)( (PBYTE)perfInstance + perfInstance->NameOffset ) ) );
+      qDebug() << "foundProcessName: " << foundProcessName;
+      if ( foundProcessName == processName ) {
         // retrieve the counters
         for( uint counter = 0; counter < perfObject->NumCounters; counter++ ) {
           if (curCounter->CounterNameTitleIndex == GETPID_PROC_ID_COUNTER) {
[prev in list] [next in list] [prev in thread] [next in thread] 

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