[X2Go-Commits] [x2goclient] 30/142: {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
Thu Jan 14 05:09:57 CET 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit 9e6c16013620ffbc6761493dd06aeaa91c664aff
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 65b10ab..10650f4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -68,6 +68,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.
* debian/control:
- Change apache2-dev | libc6-dev build dependency back to apache2-dev
only. Otherwise, apache2-dev is not installed at all, even though
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 0b9dfac..50f9fa3 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -4242,8 +4242,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";
@@ -10796,6 +10798,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