"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libs/ui/KisImportExportManager.cpp" between
krita-5.1.3.tar.xz and krita-5.1.4.tar.xz

About: Krita is a painting program offering art tools for everyone (concept art, texture and matte painters, illustrations and comics).

KisImportExportManager.cpp  (krita-5.1.3.tar.xz):KisImportExportManager.cpp  (krita-5.1.4.tar.xz)
skipping to change at line 364 skipping to change at line 364
} }
KIS_ASSERT_RECOVER_RETURN_VALUE( KIS_ASSERT_RECOVER_RETURN_VALUE(
direction == Import || direction == Export, direction == Import || direction == Export,
KisImportExportErrorCode(ImportExportCodes::InternalError)); // "bad conversion graph" KisImportExportErrorCode(ImportExportCodes::InternalError)); // "bad conversion graph"
ConversionResult result = KisImportExportErrorCode(ImportExportCodes::OK); ConversionResult result = KisImportExportErrorCode(ImportExportCodes::OK);
if (direction == Import) { if (direction == Import) {
KisUsageLogger::log(QString("Importing %1 to %2. Location: %3. Real loca tion: %4. Batchmode: %5") KisUsageLogger::log(QString("Importing %1 to %2. Location: %3. Real loca tion: %4. Batchmode: %5")
.arg(QString::fromLatin1(from)) .arg(QString::fromLatin1(from), QString::fromLat
.arg(QString::fromLatin1(to)) in1(to), location,
.arg(location) realLocation, QString::number(batchMode()))
.arg(realLocation) );
.arg(batchMode()));
// async importing is not yet supported! // async importing is not yet supported!
KIS_SAFE_ASSERT_RECOVER_NOOP(!isAsync); KIS_SAFE_ASSERT_RECOVER_NOOP(!isAsync);
// FIXME: Dmitry says "this progress reporting code never worked. Initia l idea was to implement it his way, but I stopped and didn't finish it" // FIXME: Dmitry says "this progress reporting code never worked. Initia l idea was to implement it his way, but I stopped and didn't finish it"
if (0 && !batchMode()) { if (0 && !batchMode()) {
KisAsyncActionFeedback f(i18n("Opening document..."), 0); KisAsyncActionFeedback f(i18n("Opening document..."), 0);
result = f.runAction(std::bind(&KisImportExportManager::doImport, th is, location, filter)); result = f.runAction(std::bind(&KisImportExportManager::doImport, th is, location, filter));
} else { } else {
result = doImport(location, filter); result = doImport(location, filter);
} }
if (result.status().isOk()) { if (result.status().isOk()) {
KisImageSP image = m_document->image().toStrongRef(); KisImageSP image = m_document->image().toStrongRef();
if (image) { if (image) {
KisUsageLogger::log(QString("Loaded image from %1. Size: %2 * %3 KisUsageLogger::log(QString("Loaded image from %1. Size: %2 * %3
pixels, %4 dpi. Color model: %6 %5 (%7). Layers: %8") pixels, %4 dpi. Color "
.arg(QString::fromLatin1(from)) "model: %6 %5 (%7). Layers: %8")
.arg(image->width()) .arg(QString::fromLatin1(from), QString:
.arg(image->height()) :number(image->width()),
.arg(image->xRes()) QString::number(image->height()), Q
.arg(image->colorSpace()->colorModelId().nam String::number(image->xRes()),
e()) image->colorSpace()->colorModelId()
.arg(image->colorSpace()->colorDepthId().nam .name(),
e()) image->colorSpace()->colorDepthId()
.arg(image->colorSpace()->profile()->name()) .name(),
.arg(image->nlayers())); image->colorSpace()->profile()->nam
} e(),
else { QString::number(image->nlayers())))
;
} else {
qWarning() << "The filter returned OK, but there is no image"; qWarning() << "The filter returned OK, but there is no image";
} }
} }
else { else {
KisUsageLogger::log(QString("Failed to load image from %1").arg(QStr ing::fromLatin1(from))); KisUsageLogger::log(QString("Failed to load image from %1").arg(QStr ing::fromLatin1(from)));
} }
} }
else /* if (direction == Export) */ { else /* if (direction == Export) */ {
skipping to change at line 422 skipping to change at line 417
bool alsoAsKra = false; bool alsoAsKra = false;
bool askUser = askUserAboutExportConfiguration(filter, exportConfigurati on, bool askUser = askUserAboutExportConfiguration(filter, exportConfigurati on,
from, to, from, to,
batchMode(), showWarnings , batchMode(), showWarnings ,
&alsoAsKra, isAdvancedExp orting); &alsoAsKra, isAdvancedExp orting);
if (!batchMode() && !askUser) { if (!batchMode() && !askUser) {
return KisImportExportErrorCode(ImportExportCodes::Cancelled); return KisImportExportErrorCode(ImportExportCodes::Cancelled);
} }
KisUsageLogger::log(QString("Converting from %1 to %2. Location: %3. Rea KisUsageLogger::log(
l location: %4. Batchmode: %5. Configuration: %6") QString(
.arg(QString::fromLatin1(from)) "Converting from %1 to %2. Location: %3. Real location: %4. Batc
.arg(QString::fromLatin1(to)) hmode: %5. Configuration: %6")
.arg(location) .arg(QString::fromLatin1(from), QString::fromLatin1(to), locatio
.arg(realLocation) n, realLocation,
.arg(batchMode()) QString::number(batchMode()),
.arg(exportConfiguration ? exportConfiguration->toXM (exportConfiguration ? exportConfiguration->toXML() : "none
L() : "none")); ")));
const QString alsoAsKraLocation = alsoAsKra ? getAlsoAsKraLocation(locat ion) : QString(); const QString alsoAsKraLocation = alsoAsKra ? getAlsoAsKraLocation(locat ion) : QString();
if (isAsync) { if (isAsync) {
result = QtConcurrent::run(std::bind(&KisImportExportManager::doExpo rt, this, location, filter, result = QtConcurrent::run(std::bind(&KisImportExportManager::doExpo rt, this, location, filter,
exportConfiguration, alsoAsKraL ocation)); exportConfiguration, alsoAsKraL ocation));
// we should explicitly report that the exporting has been initiated // we should explicitly report that the exporting has been initiated
result.setStatus(ImportExportCodes::OK); result.setStatus(ImportExportCodes::OK);
} else if (!batchMode()) { } else if (!batchMode()) {
 End of changes. 3 change blocks. 
28 lines changed or deleted 29 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)