Anton, Hope this is what you meant. Nikhil Bharadwaj
On Thu, Dec 18, 2014 at 3:02 PM, Nikhil Bharadwaj <[email protected]> wrote: > > Anton, > > >Squash it togeather with the previous one, forming one patch on top of > >current master. I see no reason keeping them separate. > > I didnt quite get you here... > > >A tip is to take a look at the CodingStyle. No stray newlines =) > > Point noted Anton.. I'm a newbie to all this. Ill learn...Thank you!! > > > Nikhil Bharadwaj > > On Thu, Dec 18, 2014 at 2:55 PM, Anton Lundin <[email protected]> wrote: >> >> On 18 December, 2014 - Nikhil Bharadwaj wrote: >> >> > Removed those bits as well. >> > Thanks a lot Anton for pointing out my mistakes. >> > >> > Nikhil Bharadwaj >> > >> > On Thu, Dec 18, 2014 at 2:39 PM, Anton Lundin <[email protected]> >> wrote: >> > > >> > > On 18 December, 2014 - Nikhil Bharadwaj wrote: >> > > >> > > > 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 >> > > > + >> > > >> > > Nitpicking, but no newline here. >> > > >> > > >> > > > if(!survey) { >> > > > survey = new UserSurvey(); >> > > > } >> > > > survey->show(); >> > > > -#endif >> > > > } >> > > > >> > > > QString MainWindow::filter() >> > > > -- >> > > > 2.1.0 >> > > >> > > And there are still a couple more places where NO_USERSURVEY exists. I >> > > see no point in keeping them. >> > > >> > > >> > > //Anton >> > > >> > > >> > > -- >> > > Anton Lundin +46702-161604 >> > > >> > >> > >> > -- >> > Nikhil Bharadwaj >> >> > From 3f69e0e41e106f0e002eea688573c0aeab2a112e Mon Sep 17 00:00:00 2001 >> > From: nikhil <[email protected]> >> > Date: Thu, 18 Dec 2014 14:43:37 +0530 >> > Subject: [PATCH 5/5] Added the option of explicitly opening the User >> Survey >> > from the help menu >> > >> > As per the mistake pointed out by Anton Lundin, I removed the >> possibility of >> > disabling bits of code of the User Survey. Removed all the instances of >> > NO_USERSURVEY which is not needed. >> > >> > Signed-off-by: Nikhil Bharadwaj Gosala <[email protected]> >> > --- >> > qt-ui/mainwindow.cpp | 8 ++++---- >> > 1 file changed, 4 insertions(+), 4 deletions(-) >> > >> > diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp >> > index 0e25458..d6c90e3 100644 >> > --- a/qt-ui/mainwindow.cpp >> > +++ b/qt-ui/mainwindow.cpp >> > @@ -118,9 +118,9 @@ MainWindow::MainWindow() : QMainWindow(), >> > #ifdef NO_USERMANUAL >> > ui.menuHelp->removeAction(ui.actionUserManual); >> > #endif >> > -#ifdef NO_USERSURVEY >> > + >> > ui.menuHelp->removeAction(ui.actionUserSurvey); >> > -#endif >> > + >> >> Why are you adding blank lines here? >> >> > >> > #ifdef NO_PRINTING >> > ui.menuFile->removeAction(ui.actionPrint); >> > @@ -959,12 +959,12 @@ void MainWindow::closeEvent(QCloseEvent *event) >> > #endif >> > >> > >> > -#ifndef NO_USERSURVEY >> > + >> >> And here? >> >> > if (survey && survey->isVisible()) { >> > survey->close(); >> > survey->deleteLater(); >> > } >> > -#endif >> > + >> > >> >> A tip is to take a look at the CodingStyle. No stray newlines =) >> >> Squash it togeather with the previous one, forming one patch on top of >> current master. I see no reason keeping them separate. >> >> >> //Anton >> >> >> -- >> Anton Lundin +46702-161604 >> > > > -- > Nikhil Bharadwaj > -- Nikhil Bharadwaj
From 711cffe5f90dd6e3b92a3a08cb31ec44aeb35bc5 Mon Sep 17 00:00:00 2001 From: nikhil <[email protected]> Date: Thu, 18 Dec 2014 15:43:21 +0530 Subject: [PATCH] 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. All the suggestions and 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 <[email protected]> --- qt-ui/mainwindow.cpp | 12 ------------ qt-ui/mainwindow.ui | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 4e1f8f2..4c96750 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; @@ -121,10 +118,7 @@ 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 @@ -754,12 +748,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 +954,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
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
