mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
generic: adjust to KImageIO changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
5332a323b8
commit
233adf2643
2 changed files with 8 additions and 10 deletions
|
@ -83,21 +83,19 @@ struct GvCorePrivate
|
|||
if (mimeType.isEmpty()) {
|
||||
KMessageBox::sorry(
|
||||
mMainWindow,
|
||||
i18nc("@info",
|
||||
"No image format selected.")
|
||||
i18nc("@info", "No image format selected.")
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
const QStringList typeList = KImageIO::typeForMime(mimeType);
|
||||
if (typeList.count() > 0) {
|
||||
*format = typeList[0].toAscii();
|
||||
const QString formatType = KImageIO::typeForMime(mimeType, KImageIO::Writing);
|
||||
if (!formatType.isEmpty()) {
|
||||
*format = formatType.toAscii();
|
||||
break;
|
||||
}
|
||||
KMessageBox::sorry(
|
||||
mMainWindow,
|
||||
i18nc("@info",
|
||||
"Gwenview cannot save images as %1.", mimeType)
|
||||
i18nc("@info", "Gwenview cannot save images as %1.", mimeType)
|
||||
);
|
||||
} while (true);
|
||||
|
||||
|
|
|
@ -129,9 +129,9 @@ bool KSnapshotObject::saveEqual( const KUrl& url,QWidget *widget )
|
|||
{
|
||||
QByteArray type = "PNG";
|
||||
QString mime = KMimeType::findByUrl( url.fileName(), 0, url.isLocalFile(), true )->name();
|
||||
const QStringList types = KImageIO::typeForMime(mime);
|
||||
if ( !types.isEmpty() )
|
||||
type = types.first().toLatin1();
|
||||
const QString formatType = KImageIO::typeForMime(mime, KImageIO::Writing);
|
||||
if ( !formatType.isEmpty() )
|
||||
type = formatType.toLatin1();
|
||||
|
||||
bool ok = false;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue