X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;f=src%2Flibs%2FCommon%2Finifile.cpp;h=55b9fd782a2548945fcbdd8e54cc70954d4e7618;hb=13dedf19c628b9967e4c4106ab0fd967f1df0b90;hp=838ff723630f057cb4a7e750a2f229877df1c83b;hpb=72ea4a16988f1c28e97064222e722f19bc31b3a6;p=evaf
diff --git a/src/libs/Common/inifile.cpp b/src/libs/Common/inifile.cpp
index 838ff72..55b9fd7 100644
--- a/src/libs/Common/inifile.cpp
+++ b/src/libs/Common/inifile.cpp
@@ -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 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:")) {