On Tuesday, November 06, 2012 08:10:04 PM Neil Jerram wrote:
> Radek wrote at
>
>
https://github.com/radekp/qtmoko/commit/871fe7f2bd712311ff88f2ef9042eb3112d65b1a:
> > + * Currently there is bug when generating qtopia_db.sqlite. As a result
> > you + will se no icons in the application menu. As a workaround copy
> > that db from + some older release:
> > +
> > +cp good_old_release/opt/qtmoko/qtopia_db.sqlite
> > /opt/qtmoko/qtopia_db.sqlite
>
> Hooray, thanks, I have all my icons back again now.
>
> Can I help with fixing that bug?
It seems that it's again QFileInfo problem. They have refactored it during
4.7->4.8 cycle and that broke our resource system. It's clearly a regression
in their public API, but all my bugs (even with patch) are ignored in Qt bug
tracker.
I tried simple fix for QFileInfo::suffix() which works for resources, but does
not work for regular files now.
Attached is attempt to make it working for both cases, but it's untested. I
guess i will have to go through qfileinfo.cpp commits and check if this fix is
really correct.
Regards
Radek
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index e74d357..db530e4 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -819,6 +819,8 @@ QString QFileInfo::suffix() const
if (d->isDefaultConstructed)
return QLatin1String("");
QString fileName = d->getFileName(QAbstractFileEngine::BaseName);
+ if(fileName.isEmpty())
+ return d->fileEntry.suffix();
int lastDot = fileName.lastIndexOf(QLatin1Char('.'));
if (lastDot == -1)
return QLatin1String("");
_______________________________________________
Openmoko community mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/community