Commit de9ec1f1 authored by Laurent Montel's avatar Laurent Montel 😁

Rename method

parent 3525b642
......@@ -34,7 +34,7 @@ void GrantleeThemeTest::shouldHaveDefaultValue()
{
GrantleeTheme::Theme theme;
QVERIFY(theme.description().isEmpty());
QVERIFY(theme.filename().isEmpty());
QVERIFY(theme.themeFilename().isEmpty());
QVERIFY(theme.name().isEmpty());
QVERIFY(theme.displayExtraVariables().isEmpty());
QVERIFY(theme.dirName().isEmpty());
......@@ -51,7 +51,7 @@ void GrantleeThemeTest::shouldInvalidWhenPathIsNotValid()
const QString defaultDesktopFileName(QLatin1String("bla"));
GrantleeTheme::Theme theme(themePath, dirName, defaultDesktopFileName);
QVERIFY(theme.description().isEmpty());
QVERIFY(theme.filename().isEmpty());
QVERIFY(theme.themeFilename().isEmpty());
QVERIFY(theme.name().isEmpty());
QVERIFY(theme.displayExtraVariables().isEmpty());
QVERIFY(!theme.dirName().isEmpty());
......
......@@ -35,7 +35,7 @@ Theme::Theme(const QString &themePath, const QString &dirName, const QString &de
setDirName(dirName);
setName( group.readEntry( "Name", QString() ) );
setDescription( group.readEntry( "Description", QString() ) );
setFilename( group.readEntry( "FileName" , QString() ) );
setThemeFilename( group.readEntry( "FileName" , QString() ) );
setDisplayExtraVariables( group.readEntry( "DisplayExtraVariables", QStringList() ) );
setAbsolutePath(themePath);
}
......@@ -49,7 +49,7 @@ Theme::~Theme()
bool Theme::isValid() const
{
return !mFileName.isEmpty() && !mName.isEmpty();
return !mThemeFileName.isEmpty() && !mName.isEmpty();
}
QString Theme::description() const
......@@ -62,14 +62,14 @@ void Theme::setDescription(const QString &description)
mDescription = description;
}
QString Theme::filename() const
QString Theme::themeFilename() const
{
return mFileName;
return mThemeFileName;
}
void Theme::setFilename(const QString &file)
void Theme::setThemeFilename(const QString &file)
{
mFileName = file;
mThemeFileName = file;
}
QString Theme::name() const
......
......@@ -33,8 +33,8 @@ public:
QString description() const;
void setDescription(const QString &description);
QString filename() const;
void setFilename(const QString &file);
QString themeFilename() const;
void setThemeFilename(const QString &file);
QString name() const;
void setName(const QString &);
......@@ -56,7 +56,7 @@ public:
private:
QStringList mDisplayExtraVariables;
QString mFileName;
QString mThemeFileName;
QString mDescription;
QString mName;
QString mDirName;
......
......@@ -85,7 +85,7 @@ QString GrantleeHeaderFormatter::toHtml(const GrantleeTheme::Theme &theme, bool
return errorMessage;
}
d->templateLoader->setTemplateDirs( QStringList() << theme.absolutePath() );
Grantlee::Template headerTemplate = d->engine->loadByName( theme.filename() );
Grantlee::Template headerTemplate = d->engine->loadByName( theme.themeFilename() );
if ( headerTemplate->error() ) {
errorMessage = headerTemplate->errorString();
return errorMessage;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment