Commit 93863478 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix cppcheck warning

parent 12cc720a
......@@ -116,9 +116,8 @@ void GMXImportExportPluginInterface::exportGMX()
if (QFileInfo::exists(url.isLocalFile()
? url.toLocalFile() : url.path())) {
if (url.isLocalFile() && QFileInfo::exists(url.toLocalFile())) {
PimCommon::RenameFileDialog::RenameFileDialogResult result = PimCommon::RenameFileDialog::RENAMEFILE_IGNORE;
PimCommon::RenameFileDialog *dialog = new PimCommon::RenameFileDialog(url, false, parentWidget());
result = static_cast<PimCommon::RenameFileDialog::RenameFileDialogResult>(dialog->exec());
const PimCommon::RenameFileDialog::RenameFileDialogResult result = static_cast<PimCommon::RenameFileDialog::RenameFileDialogResult>(dialog->exec());
if (result == PimCommon::RenameFileDialog::RENAMEFILE_RENAME) {
url = dialog->newName();
} else if (result == PimCommon::RenameFileDialog::RENAMEFILE_IGNORE) {
......
......@@ -53,6 +53,4 @@ QString MarkdownDiscount::toHtml() const
const QString html = QString::fromUtf8(htmlDocument, size);
mkd_cleanup(markdownHandle);
return html;
return {};
}
......@@ -102,7 +102,6 @@ void EmailLineEdit::slotSelectEmail()
dlg->view()->view()->setSelectionMode(multiSelection() ? QAbstractItemView::MultiSelection : QAbstractItemView::SingleSelection);
connect(dlg.get(), &Akonadi::AbstractEmailAddressSelectionDialog::insertAddresses, this, &EmailLineEdit::insertAddresses);
if (dlg->exec()) {
QStringList addresses;
const Akonadi::EmailAddressSelection::List lstAddress = dlg->selectedAddresses();
if (!lstAddress.isEmpty()) {
bool firstElement = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment