[Marble-devel] Re: Junior Job Patch for Review

Torsten Rahn tackat at t-online.de
Tue Oct 5 11:52:56 CEST 2010


Am Dienstag, 5. Oktober 2010 11:17:42 schrieb prashant bhutani:
> Hi,
> 
> I have considered it but I am not able to find the file in the code used to
> preserve data between restarts. Should I make one of my own?

Look into readSettings() and writeSettings() inside marble_part.h (for the KDE 
version) and QtMainWindow.h for the Qt version

Best Regards,

Torsten

 
> Thanks & Regards,
> Prashant Bhutani
> 
> 
> On Tue, Oct 5, 2010 at 1:57 PM, Bernhard Beschow
> 
> <bbeschow at cs.tu-berlin.de>wrote:
> > Hi!
> > 
> > Thanks for your patch, it looks already very good! Have you considered to
> > preserve the last directory also across restarts of Marble?
> > 
> > Greetings,
> > Bernhard
> > 
> > Am Dienstag, 5. Oktober 2010, 06:50:08 schrieb prashant bhutani:
> > > Hi all,
> > > 
> > > For Qt version of the Junior Job[1] , I am attaching the patch file (as
> > 
> > well
> > 
> > > as code[2] in this mail).
> > > I have tested it. It is working and remembering the directory last
> > 
> > opened.
> > 
> > > Please review it and do tell me if I am wrong.
> > > 
> > > Thanks & Regards,
> > > Prashant Bhutani
> > > 
> > > [1]
> > 
> > http://techbase.kde.org/Projects/Marble/GoMarble/JJ#Let_the_.22Open_....2
> > 2_file_dialog_remember_the_previously_used_directory
> > 
> > > [2] Here is the patch data ::
> > > *Index: trunk/marble/src/QtMainWindow.cpp
> > > ===================================================================
> > > --- trunk/marble/src/QtMainWindow.cpp    (revision 8)
> > > +++ trunk/marble/src/QtMainWindow.cpp    (revision 9)
> > > @@ -661,10 +661,15 @@
> > > 
> > >  void MainWindow::openFile()
> > >  {
> > > 
> > > +    static QString currentDir = QString();
> > > 
> > >      QStringList fileNames = QFileDialog::getOpenFileNames(this,
> > >      tr("Open
> > > 
> > > File"),
> > > -                            QString(),
> > > +                            currentDir,
> > > 
> > >                              tr("All Supported Files (*.gpx *.kml);;GPS
> > 
> > Data
> > 
> > > (*.gpx);;Google Earth KML (*.kml)"));
> > > 
> > > +    QDir dirObj;
> > > +
> > > +    currentDir = dirObj.absoluteFilePath( fileNames.at(
> > > fileNames.size() -1);
> > > +
> > > 
> > >      foreach( const QString &fileName, fileNames ) {
> > >      
> > >          QString extension = fileName.section( '.', -1 );*
> > 
> > _______________________________________________
> > Marble-devel mailing list
> > Marble-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/marble-devel



More information about the Marble-devel mailing list