Remove useless else
This commit is contained in:
@@ -86,10 +86,10 @@ void OpenInFileManager(const QString &path, const QUrl &url) {
|
||||
if (command.isEmpty() || command == QLatin1String("exo-open")) {
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
|
||||
}
|
||||
else if (command.startsWith(QLatin1String("nautilus"))) {
|
||||
proc.startDetached(command, QStringList() << command_params << QStringLiteral("--select") << url.toLocalFile());
|
||||
}
|
||||
else if (command.startsWith(QLatin1String("dolphin")) || command.startsWith(QLatin1String("konqueror")) || command.startsWith(QLatin1String("kfmclient"))) {
|
||||
else if (command.startsWith(QLatin1String("nautilus")) ||
|
||||
command.startsWith(QLatin1String("dolphin")) ||
|
||||
command.startsWith(QLatin1String("konqueror")) ||
|
||||
command.startsWith(QLatin1String("kfmclient"))) {
|
||||
proc.startDetached(command, QStringList() << command_params << QStringLiteral("--select") << url.toLocalFile());
|
||||
}
|
||||
else if (command.startsWith(QLatin1String("caja"))) {
|
||||
|
||||
@@ -78,13 +78,14 @@ QByteArray ImageUtils::FileToJpegData(const QString &filename) {
|
||||
if (filename.isEmpty()) return QByteArray();
|
||||
|
||||
QByteArray image_data = Utilities::ReadDataFromFile(filename);
|
||||
if (Utilities::MimeTypeFromData(image_data) == QStringLiteral("image/jpeg")) return image_data;
|
||||
else {
|
||||
QImage image;
|
||||
if (image.loadFromData(image_data)) {
|
||||
if (!image.isNull()) {
|
||||
image_data = SaveImageToJpegData(image);
|
||||
}
|
||||
if (Utilities::MimeTypeFromData(image_data) == QStringLiteral("image/jpeg")) {
|
||||
return image_data;
|
||||
}
|
||||
|
||||
QImage image;
|
||||
if (image.loadFromData(image_data)) {
|
||||
if (!image.isNull()) {
|
||||
image_data = SaveImageToJpegData(image);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user