Skip to content

Commit 890da75

Browse files
committed
fixed compiler warnings for depreciated QT functions
1 parent e00ba60 commit 890da75

File tree

6 files changed

+31
-22
lines changed

6 files changed

+31
-22
lines changed

apps/cmstapp/code/control_box/controlbox.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ idButton::idButton(QWidget* parent, const QDBusObjectPath& id) :
106106
QHBoxLayout* layout = new QHBoxLayout(this);
107107
layout->setContentsMargins(m_left, m_top, m_right, m_bottom);
108108
layout->setAlignment(Qt::AlignCenter);
109-
layout->addWidget(button, 0, 0);
109+
layout->addWidget(button, 0);
110110

111111
return;
112112
}
@@ -3032,7 +3032,7 @@ void ControlBox::findConnmanVersion()
30323032
QProcess qps;
30333033
bool b_ok = false;
30343034

3035-
qps.start("connmand -v");
3035+
qps.start("connmand -v", QStringList());
30363036
qps.waitForFinished();
30373037
f_connmanversion = qps.readAllStandardOutput().toFloat(&b_ok);
30383038
if (! b_ok) f_connmanversion = -1.0;

apps/cmstapp/code/iconman/iconman.cpp

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ DEALINGS IN THE SOFTWARE.
4040
# include <QMessageBox>
4141
# include <QProcessEnvironment>
4242
# include <QDirIterator>
43+
# include <QtGlobal>
4344

4445
// Constructor
4546
IconManager::IconManager(QObject* parent) : QObject(parent)
@@ -72,22 +73,27 @@ IconManager::IconManager(QObject* parent) : QObject(parent)
7273
QTextStream in(&f1);
7374
QString line;
7475
while (!in.atEnd()) {
75-
line = in.readLine();
76-
line = line.simplified();
77-
if (line.startsWith("[icon]", Qt::CaseInsensitive) ) {
78-
IconElement ie;
79-
QString iconame;
80-
do {
81-
line = in.readLine();
82-
if (line.startsWith("icon_name", Qt::CaseInsensitive) ) iconame = extractValue(line);
83-
else if (line.startsWith("resource", Qt::CaseInsensitive) ) ie.resource_path = extractValue(line);
84-
else if (line.startsWith("colorize", Qt::CaseInsensitive) ) ie.colorize = extractValue(line);
85-
else if (line.startsWith("fdo_name", Qt::CaseInsensitive) ) ie.fdo_name = extractValue(line);
86-
else if (line.startsWith("theme_names", Qt::CaseInsensitive) ) ie.theme_names = extractValue(line).split(',', QString::SkipEmptyParts) ;
87-
} while ( ! line.isEmpty() );
88-
icon_map[iconame] = ie;
89-
} // if [icon]
90-
} // while not atEnd()
76+
line = in.readLine();
77+
line = line.simplified();
78+
if (line.startsWith("[icon]", Qt::CaseInsensitive) ) {
79+
IconElement ie;
80+
QString iconame;
81+
do {
82+
line = in.readLine();
83+
if (line.startsWith("icon_name", Qt::CaseInsensitive) ) iconame = extractValue(line);
84+
else if (line.startsWith("resource", Qt::CaseInsensitive) ) ie.resource_path = extractValue(line);
85+
else if (line.startsWith("colorize", Qt::CaseInsensitive) ) ie.colorize = extractValue(line);
86+
else if (line.startsWith("fdo_name", Qt::CaseInsensitive) ) ie.fdo_name = extractValue(line);
87+
else if (line.startsWith("theme_names", Qt::CaseInsensitive) )
88+
#if QT_VERSION >= 0x050e00
89+
ie.theme_names = extractValue(line).split(',', Qt::SkipEmptyParts) ;
90+
#else
91+
ie.theme_names = extractValue(line).split(',', QString::SkipEmptyParts) ;
92+
#endif
93+
} while ( ! line.isEmpty() );
94+
icon_map[iconame] = ie;
95+
} // if [icon]
96+
} // while not atEnd()
9197
f1.close();
9298

9399
return;
@@ -267,11 +273,11 @@ QString IconManager::getFallback(const QString& name)
267273
QFile f0(qrc);
268274
if (!f0.open(QIODevice::ReadOnly | QIODevice::Text)) {
269275
#if QT_VERSION >= 0x050400
270-
qCritical("Error opening resource file: %s", qUtf8Printable(qrc) );
276+
qCritical("Error opening resource file: %s", qUtf8Printable(qrc) );
271277
#else
272-
qCritical("Error opening resource file: %s", qPrintable(qrc) );
278+
qCritical("Error opening resource file: %s", qPrintable(qrc) );
273279
#endif
274-
return rtnstr;
280+
return rtnstr;
275281
}
276282

277283
// Look for icon in the resource file and extract the resource value

apps/cmstapp/code/notify/notify.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ DEALINGS IN THE SOFTWARE.
3333
# include <QPixmap>
3434
# include <QTemporaryFile>
3535
# include <QFile>
36+
# include <QtGlobal>
3637

3738
# include "./notify.h"
3839

apps/resource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ DEALINGS IN THE SOFTWARE.
3535
///////////////////////////////// Program Values ///////////////////////
3636
//
3737
// Program Info (may be visible, but don't mark for tranalation)
38-
#define VERSION "2020.08.02-1"
38+
#define VERSION "2020.08.02-2"
3939

4040
#define RELEASE_DATE "9 May 2020"
4141
#define COPYRIGHT_DATE "2013-2020"

cmst.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ TRANSLATIONS += ./translations/cmst_es_ES.ts
1616
TRANSLATIONS += ./translations/cmst_es_CO.ts
1717
TRANSLATIONS += ./translations/cmst_fr_FR.ts
1818
TRANSLATIONS += ./translations/cmst_tr_TR.ts
19+
TRANSLATIONS += ./translations/cmst_nl_NL.ts
1920

2021
# non-application files which need to be installed
2122
#

text/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<ul>
55
<li>Added translation to Turkish by Yaşar Çiv.</li>
66
<li>Work around for KDE no longer displaying rich text in system tray icon popups (issue #216).</li>
7+
<li>Fixed compiler warnings on QT depreciated functions.</li>
78
</ul>
89
<b> 2020.05.09</b>
910
<ul>

0 commit comments

Comments
 (0)