OSDN Git Service

compiler warning fixes
authorIvailo Monev <xakepa10@gmail.com>
Thu, 31 Dec 2020 00:32:26 +0000 (02:32 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Thu, 31 Dec 2020 00:32:26 +0000 (02:32 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/painting/qgrayraster.c
src/plugins/bearer/connman/qconnmanservice_linux.cpp
src/plugins/bearer/connman/qconnmanservice_linux_p.h
src/plugins/sqldrivers/psql/qsql_psql.cpp
src/sql/kernel/qsqldatabase.cpp

index 3c0e4f5..cf5d6fe 100644 (file)
 
     int   n;         /* index of contour in outline     */
     int   first;     /* index of first point in contour */
-    int   error;
     char  tag;       /* current point's state           */
 
     first = 0;
index 58943a6..0129b34 100644 (file)
@@ -88,7 +88,7 @@ QConnmanManagerInterface::~QConnmanManagerInterface()
 
 void QConnmanManagerInterface::connectNotify(const char *signal)
 {
-    if (signal == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+    if (strcmp(signal + 1, "propertyChanged(QString,QDBusVariant)") == 0) {
         if(!connection().connect(QLatin1String(CONNMAN_SERVICE),
                                QLatin1String(CONNMAN_MANAGER_PATH),
                                QLatin1String(CONNMAN_MANAGER_INTERFACE),
@@ -98,7 +98,7 @@ void QConnmanManagerInterface::connectNotify(const char *signal)
         }
     }
 
-    if (signal == SIGNAL(stateChanged(QString))) {
+    if (strcmp(signal + 1, "stateChanged(QString)") == 0) {
         if (!connection().connect(QLatin1String(CONNMAN_SERVICE),
                                     QLatin1String(CONNMAN_MANAGER_PATH),
                                     QLatin1String(CONNMAN_MANAGER_INTERFACE),
@@ -108,9 +108,8 @@ void QConnmanManagerInterface::connectNotify(const char *signal)
 
         }
     }
-    if (signal == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
-        QConnmanDBusHelper *helper;
-        helper = new QConnmanDBusHelper(this);
+    if (strcmp(signal + 1, "propertyChangedContext(QString,QString,QDBusVariant)") == 0) {
+        QConnmanDBusHelper *helper = new QConnmanDBusHelper(this);
 
         connmanConnection.connect(QLatin1String(CONNMAN_SERVICE),
                                  QLatin1String(CONNMAN_MANAGER_PATH),
@@ -124,13 +123,6 @@ void QConnmanManagerInterface::connectNotify(const char *signal)
     }
 }
 
-void QConnmanManagerInterface::disconnectNotify(const char *signal)
-{
-    if (signal == SIGNAL(propertyChanged(QString,QVariant))) {
-
-    }
-}
-
 QVariant QConnmanManagerInterface::getProperty(const QString &property)
 {
     QVariant var;
@@ -371,7 +363,7 @@ QConnmanProfileInterface::~QConnmanProfileInterface()
 
 void QConnmanProfileInterface::connectNotify(const char *signal)
 {
-    if (signal == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+    if (strcmp(signal + 1, "propertyChanged(QString,QDBusVariant)") == 0) {
         connmanConnection.connect(QLatin1String(CONNMAN_SERVICE),
                                   this->path(),
                                   QLatin1String(CONNMAN_PROFILE_INTERFACE),
@@ -380,13 +372,6 @@ void QConnmanProfileInterface::connectNotify(const char *signal)
     }
 }
 
-void QConnmanProfileInterface::disconnectNotify(const char *signal)
-{
-    if (signal == SIGNAL(propertyChanged(QString,QVariant))) {
-
-    }
-}
-
 QVariantMap QConnmanProfileInterface::getProperties()
 {
     QDBusReply<QVariantMap > reply =  this->call(QLatin1String("GetProperties"));
@@ -439,14 +424,14 @@ QConnmanServiceInterface::~QConnmanServiceInterface()
 
 void QConnmanServiceInterface::connectNotify(const char *signal)
 {
-    if (signal == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+    if (strcmp(signal + 1, "propertyChanged(QString,QDBusVariant)") == 0) {
         connmanConnection.connect(QLatin1String(CONNMAN_SERVICE),
                                   this->path(),
                                   QLatin1String(CONNMAN_SERVICE_INTERFACE),
                                   QLatin1String("PropertyChanged"),
                                   this,SIGNAL(propertyChanged(QString,QDBusVariant)));
     }
-    if (signal == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+    if (strcmp(signal + 1, "propertyChangedContext(QString,QString,QDBusVariant)") == 0) {
         QConnmanDBusHelper *helper;
         helper = new QConnmanDBusHelper(this);
 
@@ -461,13 +446,6 @@ void QConnmanServiceInterface::connectNotify(const char *signal)
     }
 }
 
-void QConnmanServiceInterface::disconnectNotify(const char *signal)
-{
-    if (signal == SIGNAL(propertyChanged(QString,QVariant))) {
-
-    }
-}
-
 QVariantMap QConnmanServiceInterface::getProperties()
 {
     if(this->isValid()) {
@@ -766,14 +744,14 @@ QConnmanTechnologyInterface::~QConnmanTechnologyInterface()
 
 void QConnmanTechnologyInterface::connectNotify(const char *signal)
 {
-    if (signal == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+    if (strcmp(signal + 1, "propertyChanged(QString,QDBusVariant)") == 0) {
         connmanConnection.connect(QLatin1String(CONNMAN_SERVICE),
                                   this->path(),
                                   QLatin1String(CONNMAN_TECHNOLOGY_INTERFACE),
                                   QLatin1String("PropertyChanged"),
                                   this,SIGNAL(propertyChanged(QString,QDBusVariant)));
     }
-    if (signal == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+    if (strcmp(signal + 1, "propertyChangedContext(QString,QString,QDBusVariant)") == 0) {
         QConnmanDBusHelper *helper;
         helper = new QConnmanDBusHelper(this);
 
@@ -788,13 +766,6 @@ void QConnmanTechnologyInterface::connectNotify(const char *signal)
     }
 }
 
-void QConnmanTechnologyInterface::disconnectNotify(const char *signal)
-{
-    if (signal == SIGNAL(propertyChanged(QString,QVariant))) {
-
-    }
-}
-
 QVariantMap QConnmanTechnologyInterface::getProperties()
 {
     QDBusReply<QVariantMap> reply =  this->call(QLatin1String("GetProperties"));
@@ -846,7 +817,7 @@ QConnmanAgentInterface::~QConnmanAgentInterface()
 
 void QConnmanAgentInterface::connectNotify(const char *signal)
 {
-    if (signal == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+    if (strcmp(signal + 1, "propertyChanged(QString,QDBusVariant)") == 0) {
 //        connmanConnection.connect(QLatin1String(CONNMAN_SERVICE),
 //                                  this->path(),
 //                                  QLatin1String(CONNMAN_NETWORK_INTERFACE),
@@ -855,13 +826,6 @@ void QConnmanAgentInterface::connectNotify(const char *signal)
     }
 }
 
-void QConnmanAgentInterface::disconnectNotify(const char *signal)
-{
-    if (signal == SIGNAL(propertyChanged(QString,QDBusVariant))) {
-
-    }
-}
-
 
 void QConnmanAgentInterface::release()
 {
index c73a6d1..7387712 100644 (file)
@@ -150,7 +150,6 @@ Q_SIGNALS:
 
 protected:
     void connectNotify(const char *signal);
-    void disconnectNotify(const char *signal);
     QVariant getProperty(const QString &);
 };
 
@@ -174,7 +173,6 @@ Q_SIGNALS:
 
 protected:
     void connectNotify(const char *signal);
-    void disconnectNotify(const char *signal);
     QVariant getProperty(const QString &);
 };
 
@@ -236,7 +234,6 @@ Q_SIGNALS:
 
 protected:
     void connectNotify(const char *signal);
-    void disconnectNotify(const char *signal);
     QVariant getProperty(const QString &);
 };
 
@@ -260,7 +257,6 @@ Q_SIGNALS:
     void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
 protected:
     void connectNotify(const char *signal);
-    void disconnectNotify(const char *signal);
     QVariant getProperty(const QString &);
 
 };
@@ -280,7 +276,6 @@ public:
     void cancel();
 protected:
     void connectNotify(const char *signal);
-    void disconnectNotify(const char *signal);
 };
 
 class QConnmanCounterInterfacePrivate;
index 7b61757..db9c26c 100644 (file)
@@ -1001,6 +1001,8 @@ QSqlIndex QPSQLDriver::primaryIndex(const QString& tablename) const
     case QPSQLDriver::Version92:
     case QPSQLDriver::Version93:
     case QPSQLDriver::Version94:
+    case QPSQLDriver::Version95:
+    case QPSQLDriver::Version96:
     case QPSQLDriver::Version10:
     case QPSQLDriver::Version11:
     case QPSQLDriver::Version12:
@@ -1068,6 +1070,8 @@ QSqlRecord QPSQLDriver::record(const QString& tablename) const
     case QPSQLDriver::Version92:
     case QPSQLDriver::Version93:
     case QPSQLDriver::Version94:
+    case QPSQLDriver::Version95:
+    case QPSQLDriver::Version96:
     case QPSQLDriver::Version10:
     case QPSQLDriver::Version11:
     case QPSQLDriver::Version12:
index 3f1097f..947c64b 100644 (file)
@@ -67,9 +67,9 @@ class QSqlDatabasePrivate
 {
 public:
     QSqlDatabasePrivate(QSqlDriver *dr = Q_NULLPTR):
+        ref(1),
         driver(dr),
         port(-1),
-        ref(1),
         precisionPolicy(QSql::LowPrecisionDouble)
     {
     }
@@ -101,6 +101,7 @@ public:
 
 QSqlDatabasePrivate::QSqlDatabasePrivate(const QSqlDatabasePrivate &other)
     : ref(1),
+    driver(other.driver),
     dbname(other.dbname),
     uname(other.uname),
     pword(other.pword),
@@ -108,7 +109,6 @@ QSqlDatabasePrivate::QSqlDatabasePrivate(const QSqlDatabasePrivate &other)
     drvName(other.drvName),
     port(other.port),
     connOptions(other.connOptions),
-    driver(other.driver),
     precisionPolicy(other.precisionPolicy)
 {
 }