r21863 by jghali - #12831: scrapbook doesn't work with images
scribus-commit
scribus-commit at lists.scribus.net
Tue Apr 4 22:37:47 UTC 2017
Author: jghali
Date: Tue Apr 4 22:37:47 2017
New Revision: 21863
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21863
Log:
#12831: scrapbook doesn't work with images
Modified:
branches/Version14x/Scribus/scribus/scrapbookpalette.cpp
Modified: branches/Version14x/Scribus/scribus/scrapbookpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21863&path=/branches/Version14x/Scribus/scribus/scrapbookpalette.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scrapbookpalette.cpp (original)
+++ branches/Version14x/Scribus/scribus/scrapbookpalette.cpp Tue Apr 4 22:37:47 2017
@@ -184,6 +184,7 @@
QDir dd = QDir(dir);
dd.mkdir(QDir::cleanPath(QDir::toNativeSeparators(dir + "/" + fid.baseName())));
}
+ QString baseDir = QDir::homePath();
QString source = "";
QString target = "";
bool first = true;
@@ -191,7 +192,7 @@
while(!DOC.isNull())
{
QDomElement pg = DOC.toElement();
- if(pg.tagName() == "ITEM")
+ if (pg.tagName() == "ITEM")
{
if (first)
pg.setAttribute("ANNAME", fid.baseName());
@@ -207,7 +208,7 @@
source = QDir::cleanPath(QDir::toNativeSeparators(Pfile));
else
{
- QFileInfo pfi2(QDir::cleanPath(QDir::toNativeSeparators(dir+"/"+Pfile)));
+ QFileInfo pfi2(QDir::cleanPath(QDir::toNativeSeparators(baseDir+"/"+Pfile)));
source = pfi2.absoluteFilePath();
}
QString target = QDir::cleanPath(QDir::toNativeSeparators(dir + "/" + fid.baseName() + "/" + fi.fileName()));
@@ -222,7 +223,7 @@
source = QDir::cleanPath(QDir::toNativeSeparators(Pfile2));
else
{
- QFileInfo pfi2(QDir::cleanPath(QDir::toNativeSeparators(dir+"/"+Pfile2)));
+ QFileInfo pfi2(QDir::cleanPath(QDir::toNativeSeparators(baseDir+"/"+Pfile2)));
source = pfi2.absoluteFilePath();
}
QString target = QDir::cleanPath(QDir::toNativeSeparators(dir + "/" + fid.baseName() + "/" + fi.fileName()));
@@ -237,7 +238,7 @@
source = QDir::cleanPath(QDir::toNativeSeparators(Pfile3));
else
{
- QFileInfo pfi2(QDir::cleanPath(QDir::toNativeSeparators(dir+"/"+Pfile3)));
+ QFileInfo pfi2(QDir::cleanPath(QDir::toNativeSeparators(baseDir+"/"+Pfile3)));
source = pfi2.absoluteFilePath();
}
QString target = QDir::cleanPath(QDir::toNativeSeparators(dir + "/" + fid.baseName() + "/" + fi.fileName()));
More information about the scribus-commit
mailing list