Here is the revised patch after cleaning up unnecessary bits of code.

Anton, can you please review this and tell me if the needed changes have
been done.

On Thu, Dec 18, 2014 at 12:48 PM, Anton Lundin <[email protected]> wrote:
>
> On 18 December, 2014 - Nikhil Bharadwaj wrote:
>
> > Anton,
> >
> > I was not sure if UserSurvey worked on Android. Thats the reason I added
> > it.
>
> Please, don't top-post, and please, don't add such knobs if there not
> needed, and if they are needed they should be added everywhere.
>
> > And yeah, I overlooked the #include <usersurvey.h> on line 54.
> >
>
> Now Dork tok the patch, but please, send a following commit cleaning
> this up.
>
> > Sorry for that.
> >
>
> NP.
>
> //Anton
>
> > Nikhil Bharadwaj
> >
> > On Thu, Dec 18, 2014 at 12:07 PM, Anton Lundin <[email protected]>
> wrote:
> > >
> > > On 18 December, 2014 - Nikhil Bharadwaj wrote:
> > >
> > > > Resending the patch.
> > > >
> > > > On Wed, Dec 17, 2014 at 10:27 AM, Dirk Hohndel <[email protected]>
> wrote:
> > > > >
> > > > > On Wed, Dec 17, 2014 at 10:19:21AM +0530, Nikhil Bharadwaj wrote:
> > > > > >
> > > > > > Okay, I'm sorry. I didnt know that. Okay Ill change it and send
> it
> > > to you
> > > > > > once you finish releasing 4.3
> > > > >
> > > > > Why would you be sorry? I'm thrilled that you are contributing and
> > > working
> > > > > on making the Subsurface user experience better. That is wonderful!
> > > > >
> > > > > I apologize that the timing is just unfortunate, otherwise I would
> of
> > > > > course have accepted your patches already...
> > > > >
> > > > > /D
> > > > >
> > > >
> > > >
> > > > --
> > > > Nikhil Bharadwaj
> > >
> > > > From be92f5c121520434e6919ec4e8382e4038a75205 Mon Sep 17 00:00:00
> 2001
> > > > From: nikhil <[email protected]>
> > > > Date: Wed, 17 Dec 2014 09:29:41 +0530
> > > > Subject: [PATCH 3/3] Added the option of opening User Survey form
> > > explicitly
> > > >
> > > > Earlier, there was no option for the user to explicitly open the User
> > > Survey
> > > > form. This has been corrected by placing an option in the "Help"
> menu by
> > > which
> > > > the user can explicity open the User Survey form.
> > > >
> > > > Signed-off-by: Nikhil Bharadwaj Gosala <[email protected]>
> > > > ---
> > > >  qt-ui/mainwindow.cpp | 26 ++++++++++++++++++++++++++
> > > >  qt-ui/mainwindow.h   |  1 +
> > > >  qt-ui/mainwindow.ui  |  8 +++++++-
> > > >  3 files changed, 34 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
> > > > index acf520d..1765d4c 100644
> > > > --- a/qt-ui/mainwindow.cpp
> > > > +++ b/qt-ui/mainwindow.cpp
> > > > @@ -55,6 +55,9 @@
> > > >  #ifndef NO_USERMANUAL
> > > >  #include "usermanual.h"
> > > >  #endif
> > > > +#ifndef NO_USERSURVEY
> > >
> > > Why a NO_USERSURVEY?
> > >
> > > NO_PRINTING and NO_USERMANUAL exists due to none of those components
> > > work on Android, but the usersurvey works and i can't see a reson why
> > > disabling bits of the usersurvey?
> > >
> > > > +#include "usersurvey.h"
> > >
> > > Its already included, right out of context for this patch, line 54 in
> > > qt-ui/mainwindow.cpp
> > >
> > > > +#endif
> > > >  #include <QNetworkProxy>
> > > >
> > > >  MainWindow *MainWindow::m_Instance = NULL;
> > > > @@ -118,6 +121,10 @@ MainWindow::MainWindow() : QMainWindow(),
> > > >  #ifdef NO_USERMANUAL
> > > >       ui.menuHelp->removeAction(ui.actionUserManual);
> > > >  #endif
> > > > +#ifdef NO_USERSURVEY
> > > > +     ui.menuHelp->removeAction(ui.actionUserSurvey);
> > > > +#endif
> > > > +
> > > >  #ifdef NO_PRINTING
> > > >       ui.menuFile->removeAction(ui.actionPrint);
> > > >  #endif
> > > > @@ -745,6 +752,16 @@ void MainWindow::on_actionUserManual_triggered()
> > > >  #endif
> > > >  }
> > > >
> > > > +void MainWindow::on_actionUserSurvey_triggered()
> > > > +{
> > > > +#ifndef NO_USERSURVEY
> > > > +     if(!survey) {
> > > > +             survey = new UserSurvey();
> > >
> > > Missing a connection to the parent here.
> > >
> > >
> > > //Anton
> > >
> > >
> > > --
> > > Anton Lundin    +46702-161604
> > >
> >
> >
> > --
> > Nikhil Bharadwaj
>
> --
> Anton Lundin    +46702-161604
>


-- 
Nikhil Bharadwaj
From 3d0fc13bbd1b86916a90372ad0c80569d64c2b95 Mon Sep 17 00:00:00 2001
From: nikhil <[email protected]>
Date: Thu, 18 Dec 2014 12:24:18 +0530
Subject: [PATCH 4/4] Added the option of expilicitly opening the user-survey
 from help menu

As per the mistake pointed out by Anton Lundin, I removed the possibility of
disabling bits of code of the User Survey.

Signed-off-by: Nikhil Bharadwaj Gosala <[email protected]>
---
 qt-ui/mainwindow.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 1765d4c..0e25458 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;
@@ -754,12 +751,11 @@ void MainWindow::on_actionUserManual_triggered()
 
 void MainWindow::on_actionUserSurvey_triggered()
 {
-#ifndef NO_USERSURVEY
+
 	if(!survey) {
 		survey = new UserSurvey();
 	}
 	survey->show();
-#endif
 }
 
 QString MainWindow::filter()
-- 
2.1.0

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to