[X2Go-Commits] [x2goclient] 01/01: {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 Mar 21 00:01:14 CET 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 6c154bdcd6dfdf09add6e859f08f6b5eff5f1f80
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 | 9 ++++++---
src/unixhelper.cpp | 7 +++++++
5 files changed, 29 insertions(+), 17 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 88a65de..1ff83ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -285,6 +285,8 @@ x2goclient (4.0.4.0-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.
[ Fernando Pedemonte ]
* New upstream release (4.0.4.0):
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 e8c0026..d20fdde 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -4090,8 +4090,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";
@@ -10487,6 +10489,7 @@ void ONMainWindow::slotEmbedIntoParentWindow()
void ONMainWindow::processSessionConfig()
{
bool haveKey=false;
+ UNUSED (haveKey);
config.command="KDE";
config.brokerNoAuth=false;
@@ -11479,8 +11482,6 @@ void ONMainWindow::printSshDError_noHostPubKey()
if ( closeEventSent )
return;
- int port = clientSshPort.toInt ();
-
QString error_message = tr ("SSH daemon failed to open its public host key.");
QString detailed_error_message = tr ("You have enabled Remote Printing or File Sharing.\n"
@@ -11510,6 +11511,8 @@ void ONMainWindow::printSshDError_noHostPubKey()
}
else {
#ifdef Q_OS_DARWIN
+ int port = clientSshPort.toInt ();
+
detailed_error_message += tr ("On OS X, please follow these steps to generate the "
"required keys:"
diff --git a/src/unixhelper.cpp b/src/unixhelper.cpp
index afc7b60..3870a94 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. */
@@ -122,6 +123,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