--- qsampler/trunk/src/qsamplerOptions.cpp 2016/12/03 09:47:38 3049 +++ qsampler/trunk/src/qsamplerOptions.cpp 2019/08/15 09:09:21 3556 @@ -1,8 +1,8 @@ // qsamplerOptions.cpp // /**************************************************************************** - Copyright (C) 2004-2016, rncbc aka Rui Nuno Capela. All rights reserved. - Copyright (C) 2007,2015 Christian Schoenebeck + Copyright (C) 2004-2019, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2007,2008,2015 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -286,20 +286,20 @@ { QTextStream out(stderr); const QString sEol = "\n\n"; - int iCmdArgs = 0; const int argc = args.count(); + int iCmdArgs = 0; - for (int i = 1; i < argc; i++) { + for (int i = 1; i < argc; ++i) { if (iCmdArgs > 0) { sSessionFile += " "; sSessionFile += args.at(i); - iCmdArgs++; + ++iCmdArgs; continue; } QString sArg = args.at(i); - QString sVal = QString::null; + QString sVal; const int iEqual = sArg.indexOf("="); if (iEqual >= 0) { sVal = sArg.right(sArg.length() - iEqual - 1); @@ -321,7 +321,7 @@ } sServerHost = sVal; if (iEqual < 0) - i++; + ++i; } else if (sArg == "-p" || sArg == "--port") { if (sVal.isNull()) { @@ -330,7 +330,7 @@ } iServerPort = sVal.toInt(); if (iEqual < 0) - i++; + ++i; } else if (sArg == "-?" || sArg == "--help") { print_usage(args.at(0)); @@ -356,7 +356,7 @@ // If we don't have one by now, // this will be the startup sesion file... sSessionFile += sArg; - iCmdArgs++; + ++iCmdArgs; } } @@ -374,12 +374,11 @@ if (pWidget) { // if (bVisible) pWidget->show(); -- force initial exposure? m_settings.beginGroup("/Geometry/" + pWidget->objectName()); - #if QT_VERSION >= 0x050000 + #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) const QByteArray& geometry = m_settings.value("/geometry").toByteArray(); if (!geometry.isEmpty()) pWidget->restoreGeometry(geometry); - else #else//--LOAD_OLD_GEOMETRY QPoint wpos; QSize wsize; @@ -391,9 +390,9 @@ pWidget->move(wpos); if (wsize.width() > 0 && wsize.height() > 0) pWidget->resize(wsize); - else #endif - pWidget->adjustSize(); + // else + // pWidget->adjustSize(); if (!bVisible) bVisible = m_settings.value("/visible", false).toBool(); if (bVisible) @@ -412,7 +411,7 @@ // only save the form geometry while its up and visible) if (pWidget) { m_settings.beginGroup("/Geometry/" + pWidget->objectName()); - #if QT_VERSION >= 0x050000 + #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) m_settings.setValue("/geometry", pWidget->saveGeometry()); #else//--SAVE_OLD_GEOMETRY const QPoint& wpos = pWidget->pos(); @@ -591,3 +590,4 @@ // end of qsamplerOptions.cpp +