[PATCH] Added the option of explicitly opening the User Survey form from the help menu
Anton Lundin
glance at acc.umu.se
Sat Dec 20 01:08:18 PST 2014
On 20 December, 2014 - Nikhil Bharadwaj wrote:
> Anton,
> This is the final patch.
>
> Once instance of NO_USERSURVEY had to be retained.
>
I don't really se why it needs to be there. Can you explain?
//Anton
> Nikhil Bharadwaj
>
>
> On Thu, Dec 18, 2014 at 6:43 PM, Anton Lundin <glance at acc.umu.se> wrote:
>
> > > From d2a9f1320c09d6c2e9d4daa263de34c926150b94 Mon Sep 17 00:00:00 2001
> > > From: nikhil <nikhil.gosala at gmail.com>
> > > Date: Thu, 18 Dec 2014 15:43:21 +0530
> > > Subject: [PATCH] (71dbcdc0d625e5dc2a2bc2de5b8be1962fb92f9e) patch code
> > cleanup
> > >
> > > (71dbcdc0d625e5dc2a2bc2de5b8be1962fb92f9e) is already in master, and
> > > this code cleans it up a bit.
> > > All the suggestions and mistakes pointed out by Anton Lundin have been
> > > incorporated. This includes removing extra lines of code, stray newlines
> > etc.
> > >
> >
> >
> > Not yet here but where on the right track.
> >
> > The subject isn't that clear. We usually never write commit-ids in the
> > subject either. I would guess that a subject down the line of
> > "Remove NO_USERSURVEY and code cleanup"
> >
> > Usually we don't write the whole sha1-sums, we shorten them to 12 and
> > include the subject of the patch instead. This lightens the burden on
> > your eyes reading it, but you still exactly identify the commit, and you
> > give the reader a reminder about which patch 71dbcdc0d625 was.
> >
> > Some better explanations and tips can be fund at:
> >
> > https://github.com/torvalds/linux/blob/master/Documentation/SubmittingPatches#L149
> >
> >
> > Some examples you can look at are, 6263857f74a3, 514a0e582a7cm
> > 55763d3da1c0 and so on.
> >
> >
> > //Anton
> >
> >
> > --
> > Anton Lundin +46702-161604
> >
>
>
>
> --
> Nikhil Bharadwaj
> From d391bde84b510ffc2dfc7149a906b4b15b851a63 Mon Sep 17 00:00:00 2001
> From: nikhil <nikhil.gosala at gmail.com>
> Date: Thu, 18 Dec 2014 21:36:44 +0530
> Subject: [PATCH] Removed some instances of NO_USERSURVEY and code cleanup
>
> "71dbcdc0d625-Added the option of opening user survey form exlpicitly" is
> already in master, and this code cleans it up a bit.
> All the suggestions ans mistakes pointed out by Anton Lundin have been
> incorporated. This includes removing extra lines of code, stray newlines etc.
>
> Signed-off-by: Nikhil Bharadwaj Gosala <nikhil.gosala at gmail.com>
> ---
> qt-ui/mainwindow.cpp | 10 ----------
> qt-ui/mainwindow.ui | 2 +-
> 2 files changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
> index 4e1f8f2..dcf111e 100644
> --- a/qt-ui/mainwindow.cpp
> +++ b/qt-ui/mainwindow.cpp
> @@ -55,9 +55,6 @@
> #ifndef NO_USERMANUAL
> #include "usermanual.h"
> #endif
> -#ifndef NO_USERSURVEY
> -#include "usersurvey.h"
> -#endif
> #include <QNetworkProxy>
>
> MainWindow *MainWindow::m_Instance = NULL;
> @@ -124,7 +121,6 @@ MainWindow::MainWindow() : QMainWindow(),
> #ifdef NO_USERSURVEY
> ui.menuHelp->removeAction(ui.actionUserSurvey);
> #endif
> -
> #ifdef NO_PRINTING
> ui.menuFile->removeAction(ui.actionPrint);
> #endif
> @@ -754,12 +750,10 @@ void MainWindow::on_actionUserManual_triggered()
>
> void MainWindow::on_actionUserSurvey_triggered()
> {
> -#ifndef NO_USERSURVEY
> if(!survey) {
> survey = new UserSurvey();
> }
> survey->show();
> -#endif
> }
>
> QString MainWindow::filter()
> @@ -962,14 +956,10 @@ void MainWindow::closeEvent(QCloseEvent *event)
> }
> #endif
>
> -
> -#ifndef NO_USERSURVEY
> if (survey && survey->isVisible()) {
> survey->close();
> survey->deleteLater();
> }
> -#endif
> -
>
> if (unsaved_changes() && (askSaveChanges() == false)) {
> event->ignore();
> diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui
> index dc38a0d..08c8d34 100644
> --- a/qt-ui/mainwindow.ui
> +++ b/qt-ui/mainwindow.ui
> @@ -864,7 +864,7 @@ p, li { white-space: pre-wrap; }
> </action>
> <action name="actionUserSurvey">
> <property name="text">
> - <string>User &Survey</string>
> + <string>User &survey</string>
> </property>
> </action>
> </widget>
> --
> 2.1.0
>
--
Anton Lundin +46702-161604
More information about the subsurface
mailing list