From 4d75045cd8eac6ca28976e7bb382447b2bceaea8 Mon Sep 17 00:00:00 2001 From: Yuri Chornoivan Date: Sat, 4 Apr 2020 12:17:50 +0300 Subject: [PATCH] Fix minor EBN issues --- autotests/searchtest.cpp | 4 ++-- core/form.h | 2 +- core/scripter.h | 2 +- core/textpage.h | 2 +- ui/embeddedfilesdialog.cpp | 4 ++-- ui/latexrenderer.cpp | 2 +- ui/pageviewutils.h | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/autotests/searchtest.cpp b/autotests/searchtest.cpp index d2f4c5319..7489bbac6 100644 --- a/autotests/searchtest.cpp +++ b/autotests/searchtest.cpp @@ -294,12 +294,12 @@ void SearchTest::testHyphenAtEndOfLineWithoutYOverlap() QCOMPARE(*result, expected); delete result; - // If the user is looking for the text explicitely with the hyphen also find it + // If the user is looking for the text explicitly with the hyphen also find it result = tp->findText(0, QStringLiteral("super-cali-fragilistic"), Okular::FromTop, Qt::CaseSensitive, nullptr); QVERIFY(result); delete result; - // If the user is looking for the text explicitely with the hyphen also find it + // If the user is looking for the text explicitly with the hyphen also find it result = tp->findText(0, QStringLiteral("super-cali-fragilistic"), Okular::FromBottom, Qt::CaseSensitive, nullptr); QVERIFY(result); delete result; diff --git a/core/form.h b/core/form.h index 9d42ce216..e3e837e01 100644 --- a/core/form.h +++ b/core/form.h @@ -431,7 +431,7 @@ class OKULARCORE_EXPORT FormFieldChoice : public FormField /** * The possible choices of the choice field. - * The key is the the display name of the choice, + * The key is the display name of the choice, * The value is the export value (i.e. for use in javascript, etc) of the choice * * @since 1.11 diff --git a/core/scripter.h b/core/scripter.h index 451d792e5..4c2628040 100644 --- a/core/scripter.h +++ b/core/scripter.h @@ -41,7 +41,7 @@ class Scripter friend class ScripterPrivate; ScripterPrivate* d; - Scripter( DocumentPrivate *doc ); + explicit Scripter( DocumentPrivate *doc ); }; } diff --git a/core/textpage.h b/core/textpage.h index 2dd83a24b..ae8b5cee2 100644 --- a/core/textpage.h +++ b/core/textpage.h @@ -131,7 +131,7 @@ class OKULARCORE_EXPORT TextPage /** * Creates a new text page with the given @p words. */ - TextPage( const TextEntity::List &words ); + explicit TextPage( const TextEntity::List &words ); /** * Destroys the text page. diff --git a/ui/embeddedfilesdialog.cpp b/ui/embeddedfilesdialog.cpp index 915543b11..298645e44 100644 --- a/ui/embeddedfilesdialog.cpp +++ b/ui/embeddedfilesdialog.cpp @@ -181,10 +181,10 @@ void EmbeddedFilesDialog::viewFile( Okular::EmbeddedFile* ef ) // using QTemporaryFile's XXXXXX placeholder QTemporaryFile *tmpFile = new QTemporaryFile( QDir::tempPath() - + "/" + + '/' + fileInfo.baseName() + ".XXXXXX" - + (fileInfo.completeSuffix().isEmpty() ? QLatin1String("") : QString("." + fileInfo.completeSuffix())) + + (fileInfo.completeSuffix().isEmpty() ? QLatin1String("") : QString('.' + fileInfo.completeSuffix())) ); GuiUtils::writeEmbeddedFile( ef, this, *tmpFile ); diff --git a/ui/latexrenderer.cpp b/ui/latexrenderer.cpp index 8e8381509..37f14b3f1 100644 --- a/ui/latexrenderer.cpp +++ b/ui/latexrenderer.cpp @@ -121,7 +121,7 @@ LatexRenderer::Error LatexRenderer::handleLatex( QString& fileName, const QStrin tempFile->open(); QString tempFileName = tempFile->fileName(); QFileInfo *tempFileInfo = new QFileInfo(tempFileName); - QString tempFileNameNS = tempFileInfo->absolutePath() + "/" + tempFileInfo->baseName(); + QString tempFileNameNS = tempFileInfo->absolutePath() + '/' + tempFileInfo->baseName(); QString tempFilePath = tempFileInfo->absolutePath(); delete tempFileInfo; QTextStream tempStream(tempFile); diff --git a/ui/pageviewutils.h b/ui/pageviewutils.h index 18b2437d4..9310284f5 100644 --- a/ui/pageviewutils.h +++ b/ui/pageviewutils.h @@ -41,7 +41,7 @@ class Page; class PageViewItem { public: - PageViewItem( const Okular::Page * page ); + explicit PageViewItem( const Okular::Page * page ); ~PageViewItem(); PageViewItem(const PageViewItem &) = delete;