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

List:       kde-commits
Subject:    KDE/kdelibs/solid
From:       Bernhard Loos <nhuh.put () web ! de>
Date:       2007-08-27 22:00:57
Message-ID: 1188252057.951147.15486.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 705410 by bloos:

rename Solid::Processor::extensions to instructionSets

 M  +7 -7      examples/tutorial3/tutorial3.cpp  
 M  +1 -1      solid/backends/fakehw/fakecomputer.xml  
 M  +9 -9      solid/backends/fakehw/fakeprocessor.cpp  
 M  +1 -1      solid/backends/fakehw/fakeprocessor.h  
 M  +9 -9      solid/backends/hal/halprocessor.cpp  
 M  +1 -1      solid/backends/hal/halprocessor.h  
 M  +1 -1      solid/ifaces/processor.h  
 M  +2 -2      solid/processor.cpp  
 M  +13 -13    solid/processor.h  
 M  +4 -4      tests/fakehardwaretest.cpp  


--- trunk/KDE/kdelibs/solid/examples/tutorial3/tutorial3.cpp #705409:705410
@@ -51,13 +51,13 @@
     Solid::Processor *processor = device.as<Solid::Processor>();
     kDebug() << "This processors maximum speed is: " << processor->maxSpeed();
 
-    Solid::Processor::Extensions extensions = processor->extensions();
-    kDebug() << "Intel MMX supported:" << (bool)(extensions & Solid::Processor::IntelMMX);
-    kDebug() << "Intel SSE supported:" << (bool)(extensions & Solid::Processor::IntelSSE);
-    kDebug() << "Intel SSE2 supported:" << (bool)(extensions & Solid::Processor::IntelSSE2);
-    kDebug() << "Intel SSE3 supported:" << (bool)(extensions & Solid::Processor::IntelSSE3);
-    kDebug() << "Intel SSE4 supported:" << (bool)(extensions & Solid::Processor::IntelSSE4);
-    kDebug() << "AMD 3DNOW supported:" << (bool)(extensions & Solid::Processor::AMD3DNOW);
+    Solid::Processor::InstructionSets extensions = processor->instructionSets();
+    kDebug() << "Intel MMX supported:" << (bool)(extensions & Solid::Processor::IntelMmx);
+    kDebug() << "Intel SSE supported:" << (bool)(extensions & Solid::Processor::IntelSse);
+    kDebug() << "Intel SSE2 supported:" << (bool)(extensions & Solid::Processor::IntelSse2);
+    kDebug() << "Intel SSE3 supported:" << (bool)(extensions & Solid::Processor::IntelSse3);
+    kDebug() << "Intel SSE4 supported:" << (bool)(extensions & Solid::Processor::IntelSse4);
+    kDebug() << "AMD 3DNOW supported:" << (bool)(extensions & Solid::Processor::Amd3DNow);
     kDebug() << "PPC AltiVec supported:" << (bool)(extensions & Solid::Processor::AltiVec);
 
     return 0;
--- trunk/KDE/kdelibs/solid/solid/backends/fakehw/fakecomputer.xml #705409:705410
@@ -79,7 +79,7 @@
             <property key="number">0</property>
             <property key="maxSpeed">3200</property>
             <property key="canChangeFrequency">true</property>
-            <property key="extensions">mmx,sse</property>
+            <property key="instructionSets">mmx,sse</property>
         </device>
         <device udi="/org/kde/solid/fakehw/acpi_CPU1">
             <property key="name">Solid Processor #1</property>
--- trunk/KDE/kdelibs/solid/solid/backends/fakehw/fakeprocessor.cpp #705409:705410
@@ -47,32 +47,32 @@
     return fakeDevice()->property("canChangeFrequency").toBool();
 }
 
-Solid::Processor::Extensions FakeProcessor::extensions() const
+Solid::Processor::InstructionSets FakeProcessor::instructionSets() const
 {
-    Solid::Processor::Extensions result;
+    Solid::Processor::InstructionSets result;
 
-    QString str = fakeDevice()->property("extensions").toString();
+    QString str = fakeDevice()->property("instructionSets").toString();
 
     QStringList extension_list = str.split(",");
 
     foreach (const QString &extension_str, extension_list) {
         if (extension_str == "mmx") {
-            result |= Solid::Processor::IntelMMX;
+            result |= Solid::Processor::IntelMmx;
         }
         else if (extension_str == "sse") {
-            result |= Solid::Processor::IntelSSE;
+            result |= Solid::Processor::IntelSse;
         }
         else if (extension_str == "sse2") {
-            result |= Solid::Processor::IntelSSE2;
+            result |= Solid::Processor::IntelSse2;
         }
         else if (extension_str == "sse3") {
-            result |= Solid::Processor::IntelSSE3;
+            result |= Solid::Processor::IntelSse3;
         }
         else if (extension_str == "sse4") {
-            result |= Solid::Processor::IntelSSE4;
+            result |= Solid::Processor::IntelSse4;
         }
         else if (extension_str == "3dnow") {
-            result |= Solid::Processor::AMD3DNOW;
+            result |= Solid::Processor::Amd3DNow;
         }
         else if (extension_str == "altivec") {
             result |= Solid::Processor::AltiVec;
--- trunk/KDE/kdelibs/solid/solid/backends/fakehw/fakeprocessor.h #705409:705410
@@ -42,7 +42,7 @@
     virtual int number() const;
     virtual int maxSpeed() const;
     virtual bool canChangeFrequency() const;
-    virtual Solid::Processor::Extensions extensions() const;
+    virtual Solid::Processor::InstructionSets instructionSets() const;
 };
 }
 }
--- trunk/KDE/kdelibs/solid/solid/backends/hal/halprocessor.cpp #705409:705410
@@ -56,11 +56,11 @@
     return false;
 }
 
-static Solid::Processor::Extensions cpuFeatures();
+static Solid::Processor::InstructionSets cpuFeatures();
 
-Solid::Processor::Extensions Processor::extensions() const
+Solid::Processor::InstructionSets Processor::instructionSets() const
 {
-    static Solid::Processor::Extensions cpuextensions = cpuFeatures();
+    static Solid::Processor::InstructionSets cpuextensions = cpuFeatures();
 
     return cpuextensions;
 }
@@ -98,7 +98,7 @@
 }
 #endif
 
-static Solid::Processor::Extensions cpuFeatures()
+static Solid::Processor::InstructionSets cpuFeatures()
 {
     volatile unsigned int features = 0;
 
@@ -190,16 +190,16 @@
     }
 #endif // __i386__
 #endif //HAVE_GNU_INLINE_ASM
-    Solid::Processor::Extensions featureflags;
+    Solid::Processor::InstructionSets featureflags;
 
     if (features & 0x80000000)
-        featureflags |= Solid::Processor::AMD3DNOW;
+        featureflags |= Solid::Processor::Amd3DNow;
     if (features & 0x00800000)
-        featureflags |= Solid::Processor::IntelMMX;
+        featureflags |= Solid::Processor::IntelMmx;
     if (features & 0x00200000)
-        featureflags |= Solid::Processor::IntelSSE;
+        featureflags |= Solid::Processor::IntelSse;
     if (features & 0x00400000)
-        featureflags |= Solid::Processor::IntelSSE2;
+        featureflags |= Solid::Processor::IntelSse2;
     if (features & 0x1)
         featureflags |= Solid::Processor::AltiVec;
 
--- trunk/KDE/kdelibs/solid/solid/backends/hal/halprocessor.h #705409:705410
@@ -43,7 +43,7 @@
     virtual int number() const;
     virtual int maxSpeed() const;
     virtual bool canChangeFrequency() const;
-    virtual Solid::Processor::Extensions extensions() const;
+    virtual Solid::Processor::InstructionSets instructionSets() const;
 };
 }
 }
--- trunk/KDE/kdelibs/solid/solid/ifaces/processor.h #705409:705410
@@ -67,7 +67,7 @@
          *
          * @return the extensions supported by the CPU
          */
-        virtual Solid::Processor::Extensions extensions() const = 0;
+        virtual Solid::Processor::InstructionSets instructionSets() const = 0;
 
     };
 }
--- trunk/KDE/kdelibs/solid/solid/processor.cpp #705409:705410
@@ -52,10 +52,10 @@
     return_SOLID_CALL(Ifaces::Processor *, d->backendObject(), false, canChangeFrequency());
 }
 
-Solid::Processor::Extensions Solid::Processor::extensions() const
+Solid::Processor::InstructionSets Solid::Processor::instructionSets() const
 {
     Q_D(const Processor);
-    return_SOLID_CALL(Ifaces::Processor *, d->backendObject(), Extensions(), extensions());
+    return_SOLID_CALL(Ifaces::Processor *, d->backendObject(), InstructionSets(), instructionSets());
 }
 
 #include "processor.moc"
--- trunk/KDE/kdelibs/solid/solid/processor.h #705409:705410
@@ -35,12 +35,12 @@
     class SOLID_EXPORT Processor : public DeviceInterface
     {
         Q_OBJECT
-        Q_ENUMS(Extension)
-        Q_FLAGS(Extensions)
+        Q_ENUMS(InstructionSet)
+        Q_FLAGS(InstructionSets)
         Q_PROPERTY(int number READ number)
         Q_PROPERTY(qulonglong maxSpeed READ maxSpeed)
         Q_PROPERTY(bool canChangeFrequency READ canChangeFrequency)
-        Q_PROPERTY(Extensions extensions READ extensions)
+        Q_PROPERTY(InstructionSets instructionSets READ instructionSets)
         Q_DECLARE_PRIVATE(Processor)
         friend class Device;
 
@@ -60,21 +60,21 @@
          * This enum contains the list of architecture extensions you
          * can query.
          */
-        enum Extension {
+        enum InstructionSet {
             NoExtensions = 0x0,
-            IntelMMX = 0x1,
-            IntelSSE = 0x2,
-            IntelSSE2 = 0x4,
-            IntelSSE3 = 0x8,
-            IntelSSE4 = 0x10,
-            AMD3DNOW = 0x20,
+            IntelMmx = 0x1,
+            IntelSse = 0x2,
+            IntelSse2 = 0x4,
+            IntelSse3 = 0x8,
+            IntelSse4 = 0x10,
+            Amd3DNow = 0x20,
             AltiVec = 0x40
         };
 
         /*
          * The flags for the Extension enum.
          */
-        Q_DECLARE_FLAGS(Extensions, Extension)
+        Q_DECLARE_FLAGS(InstructionSets, InstructionSet)
 
 
         /**
@@ -119,10 +119,10 @@
          *
          * @return the extensions supported by the CPU
          */
-        Extensions extensions() const;
+        InstructionSets instructionSets() const;
     };
 }
 
-Q_DECLARE_OPERATORS_FOR_FLAGS(Solid::Processor::Extensions)
+Q_DECLARE_OPERATORS_FOR_FLAGS(Solid::Processor::InstructionSets)
 
 #endif
--- trunk/KDE/kdelibs/solid/tests/fakehardwaretest.cpp #705409:705410
@@ -61,10 +61,10 @@
     QCOMPARE(processor->canChangeFrequency(), true);
     QCOMPARE((int)processor->maxSpeed(), 3200);
 
-    Solid::Processor::Extensions extensions;
-    extensions |= Solid::Processor::IntelMMX;
-    extensions |= Solid::Processor::IntelSSE;
-    QCOMPARE(processor->extensions(), extensions);
+    Solid::Processor::InstructionSets instructionsets;
+    instructionsets |= Solid::Processor::IntelMmx;
+    instructionsets |= Solid::Processor::IntelSse;
+    QCOMPARE(processor->instructionSets(), instructionsets);
 }
 
 #include "fakehardwaretest.moc"
[prev in list] [next in list] [prev in thread] [next in thread] 

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