CVS commit by jkivlighn: Simplify how it gets the current krecipes version M +4 -8 baseexporter.cpp 1.7 M +1 -1 baseexporter.h 1.6 --- kdenonbeta/krecipes/src/exporters/baseexporter.h #1.5:1.6 @@ -44,5 +44,5 @@ protected: /** Attempt to return the version of the application via - * KMainWindow::memberList[0]->instance()->aboutData()->version() + * KGlobal::instance()->aboutData()->version() * This can be used by exporters to put the version of the app exporting the file. */ --- kdenonbeta/krecipes/src/exporters/baseexporter.cpp #1.6:1.7 @@ -19,5 +19,5 @@ #include #include -#include +#include #include @@ -120,11 +120,7 @@ void BaseExporter::saveToFile( const QPt QString BaseExporter::krecipes_version() const { - //hopefully we'll get the version from the first in the list - if ( KMainWindow::memberList && KMainWindow::memberList->at(0) ) - { - KInstance *this_instance = KMainWindow::memberList->at(0)->instance(); + KInstance *this_instance = KGlobal::instance(); if ( this_instance && this_instance->aboutData() ) return this_instance->aboutData()->version(); - } return QString::null; //Oh, well. We couldn't get the version.