]> vaikene.ee Git - evaf/blobdiff - src/libs/Common/inifile.cpp
Mac OS changes and switched to c++11.
[evaf] / src / libs / Common / inifile.cpp
index 838ff723630f057cb4a7e750a2f229877df1c83b..55b9fd782a2548945fcbdd8e54cc70954d4e7618 100644 (file)
@@ -37,13 +37,13 @@ using namespace eVaf::Common;
 //-------------------------------------------------------------------
 
 IniFile::IniFile(QString const & fileName, QIODevice::OpenMode mode)
+    : d(new Internal::IniFileImpl(fileName, mode))
 {
-    d = new Internal::IniFileImpl(fileName, mode);
 }
 
 IniFile::~IniFile()
 {
-    delete d;
+    d.reset();
 }
 
 bool IniFile::isValid() const
@@ -207,7 +207,7 @@ QExplicitlySharedDataPointer<IniFileValue> IniFileImpl::getParameter(QFile & fil
 
         // Check for the 'windows:' or 'linux:' prefix in the parameter name
         bool thisOsOnly = false;
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS)
         if (name.startsWith("windows:"))
             continue;
         if (name.startsWith("linux:")) {