Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[localthemedaemonclient] fix SVG prioritisation over inheritance #14

Merged
merged 1 commit into from Oct 22, 2013

Conversation

sledges
Copy link

@sledges sledges commented Oct 22, 2013

The whole model has been simplified: all file names (without path and extension)
are stored in one hash array across all inherited themes. Since extension is
ignored, the topmost theme to provide the graphic wins the race, no matter what
the file type is.

The whole model has been simplified: all file names (without path and extension)
are stored in one hash array across all inherited themes. Since extension is
ignored, the topmost theme to provide the graphic wins the race, no matter what
the file type is.
@@ -206,7 +197,8 @@ void MLocalThemeDaemonClient::buildHash(const QDir& rootDir, const QStringList&
rDir.setNameFilters(nameFilter);
QStringList files = rDir.entryList(QDir::Files);
foreach (const QString &filename, files) {
m_filenameHash.insert(filename, rootDir.absolutePath());
QFileInfo fi(filename);
m_filenameHash.insert(fi.baseName(), rootDir.absolutePath() + QDir::separator() + filename);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fi.absolutePath() is probably the same thing as the second argument you're constructing with concatenations

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope it isn't: the filename variable contains only file name e.g. "graphic-l-sample.png" (no path). As before this commit, it used to be done as "m_filenameHash.insert(filename, ...".
Proof: readImage(id) does m_filenameHash.value(id [+suffix before this patch]) , where id is only filename without extension (no path)

@rburchell
Copy link
Contributor

OK

@sledges
Copy link
Author

sledges commented Oct 22, 2013

Tested, works, approved, pulling the trigger

sledges added a commit that referenced this pull request Oct 22, 2013
[localthemedaemonclient] fix SVG prioritisation over inheritance
@sledges sledges merged commit 8f55f15 into nemomobile:qtquick2 Oct 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants