[X2Go-Commits] [x2goclient] 26/55: {appdialog, configwidget, onmainwindow, unixhelper}.cpp: fix some compile warnings with GCC. Fix a few whitespace issues.

git-admin at x2go.org git-admin at x2go.org
Wed Aug 26 20:58:21 CEST 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit e19230075b2776d837cafa219b88d33436ff12b7
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Mar 21 00:00:59 2015 +0100

    {appdialog,configwidget,onmainwindow,unixhelper}.cpp: fix some compile warnings with GCC. Fix a few whitespace issues.
---
 debian/changelog     |    2 ++
 src/appdialog.cpp    |   22 ++++++++++++----------
 src/configwidget.cpp |    6 ++----
 src/onmainwindow.cpp |    5 ++++-
 src/unixhelper.cpp   |    7 +++++++
 5 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 93567a3..23cd29c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -51,6 +51,8 @@ x2goclient (4.0.5.1-0x2go1) UNRELEASED; urgency=low
       and SIGUSR2.
     - x2goclient.cpp: fix failing exec() call for the UNIX helper utility:
       correctly terminate arguments vector.
+    - {appdialog,configwidget,onmainwindow,unixhelper}.cpp: fix some compile
+      warnings with GCC. Fix a few whitespace issues.
 
   [ Oleksandr Shneyder ]
   * New upstream release (4.0.5.1):
diff --git a/src/appdialog.cpp b/src/appdialog.cpp
index f10be8f..a8ec4ec 100644
--- a/src/appdialog.cpp
+++ b/src/appdialog.cpp
@@ -156,16 +156,18 @@ void AppDialog::loadApps()
             break;
         }
 
-        QTreeWidgetItem* it;
-        if (app.category==Application::TOP)
-            it=new QTreeWidgetItem(treeWidget);
-        else
-            it=new QTreeWidgetItem(parent);
-        it->setText(0, app.name);
-        it->setToolTip(0,app.comment);
-        it->setIcon(0,app.icon);
-        it->setData(0, Qt::UserRole, app.exec);
-        it->setData(0, Qt::UserRole+1, app.comment);
+        if (parent) {
+            QTreeWidgetItem* it;
+            if (app.category==Application::TOP)
+                it=new QTreeWidgetItem(treeWidget);
+            else
+                it=new QTreeWidgetItem(parent);
+            it->setText(0, app.name);
+            it->setToolTip(0,app.comment);
+            it->setIcon(0,app.icon);
+            it->setData(0, Qt::UserRole, app.exec);
+            it->setData(0, Qt::UserRole+1, app.comment);
+        }
     }
     treeWidget->sortItems(0,Qt::AscendingOrder);
 }
diff --git a/src/configwidget.cpp b/src/configwidget.cpp
index e98ad4d..c9b8baa 100644
--- a/src/configwidget.cpp
+++ b/src/configwidget.cpp
@@ -24,8 +24,8 @@ ConfigWidget::ConfigWidget ( QString id, ONMainWindow * mw,
 {
 	sessionId=id;
 	mainWindow=mw;
-	miniMode=mw->retMiniMode();	
-	embedMode=embedMode= mw->getEmbedMode();
+	miniMode=mw->retMiniMode();
+	embedMode = mw->getEmbedMode();
 	if(embedMode)
 		sessionId="embedded";
 }
@@ -34,5 +34,3 @@ ConfigWidget::ConfigWidget ( QString id, ONMainWindow * mw,
 ConfigWidget::~ConfigWidget()
 {
 }
-
-
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 35faced..c57b168 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -4178,8 +4178,10 @@ void ONMainWindow::resumeSession ( const x2goSession& s )
     if (! startXorgOnStart)
         startXOrg();
 // #endif
+#else /* defined (Q_OS_WIN) */
+    UNUSED (rootless);
+#endif /* defined (Q_OS_WIN) */
 
-#endif
     if ( fullscreen )
     {
         geometry="fullscreen";
@@ -10610,6 +10612,7 @@ void ONMainWindow::slotEmbedIntoParentWindow()
 void ONMainWindow::processSessionConfig()
 {
     bool haveKey=false;
+    UNUSED (haveKey);
 
     config.command="KDE";
     config.brokerNoAuth=false;
diff --git a/src/unixhelper.cpp b/src/unixhelper.cpp
index acdee33..d5aa67d 100644
--- a/src/unixhelper.cpp
+++ b/src/unixhelper.cpp
@@ -29,6 +29,7 @@
 #include <cstring>
 #include <cerrno>
 #include <vector>
+#include <cstdlib>
 
 /* For documentation please see unixhelper.h. */
 
@@ -117,6 +118,12 @@ namespace unixhelper {
 
       sleep (2);
     }
+
+    /*
+     * Anything here shall be unreachable.
+     * But make compilers happy by returning something.
+     */
+    return (EXIT_SUCCESS);
   }
 }
 

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list