[X2Go-Commits] [x2goclient] 26/217: {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
Sat Aug 27 19:24:18 CEST 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 c41a89631d9b3a696b4c781177ec96553e9e6fd8
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 9791117..eff5175 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -84,6 +84,8 @@ x2goclient (4.0.5.2-0x2go1) UNRELEASED; urgency=medium
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:
- Maintainer change in package: X2Go Developers <x2go-dev at lists.x2go.org>.
- Uploaders: add myself. Also, force a rebuild due to the changed
diff --git a/src/appdialog.cpp b/src/appdialog.cpp
index 4b25ee9..327ffdc 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 d0f67ba..c450e48 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 b4413f0..757b003 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -4296,8 +4296,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";
@@ -10955,6 +10957,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