[Digikam-devel] [digikam] [Bug 348347] Can't create albums - menu is greyed out

Christian Butcher chrisb2244 at gmail.com
Fri May 29 07:23:18 BST 2015


https://bugs.kde.org/show_bug.cgi?id=348347

--- Comment #5 from Christian Butcher <chrisb2244 at gmail.com> ---
So, the problem appears to be that (for some reason I don't understand, and
which is obviously dependent on some poor configuration on my system), the 

'item.path' in utilities/setup/collections/setupcollectionview.cpp is being
prepended with 'file:/' or 'file:///'.

If I add the lines
QString longFileStart = QString::fromLatin1("file://");
        QString shortFileStart = QString::fromLatin1("file:");
        if (item.path.startsWith(longFileStart))
        //if (item.path.left(7) == longFileStart)
        {
            qCDebug(DIGIKAM_GENERAL_LOG) << "item.path starts with 'file://'.
Removing this prefix (it will be readded)";
            item.path = item.path.right(item.path.size() - 7);
            qCDebug(DIGIKAM_GENERAL_LOG) << "new item.path = " << item.path;
        }
        else if (item.path.startsWith(shortFileStart))
        //else if (item.path.left(5) == shortFileStart)
        {
            qCDebug(DIGIKAM_GENERAL_LOG) << "item.path starts with 'file:'.
Removing this prefix (it will be readded)";
            item.path = item.path.right(item.path.size() - 5);
            qCDebug(DIGIKAM_GENERAL_LOG) << "new item.path = " << item.path;
        }

at around line 417, then my digiKam installation will happily add the
collection, and import photographs, etc etc...

I'm pretty sure this isn't even remotely a good solution (especially since I
don't know what else is broken by my system returning strange paths).

It would seem that this has something to do with the QUrl::fromLocalFile(...)
function. I don't know where, but it would seem that this could be being called
twice, once earlier than intended (before the QUrl is passed to
SetupCollectionModel::apply() ).

I'm using the git repo qt-5. I'm not sure if this has made some change which is
upsetting matters, but I did have to add some includes to digiKam files, in
order to make it build. 

The list is as follows (but they seem like reasonable #includes, since the
classes are explicitly referenced in the files)
QDataStream or QObject in:
  app/dragdrop/ddragobjects.cpp
  utilities/advancedrename/advancedrenamemanager.h
  libs/database/collection/collectionmanager.h
  libs/dimg/filters/curves/imagecurves.cpp

QMap in:
  libs/database/item/imagetagpair.h
  libs/database/utils/tagproperties.h

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list