summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-07-11 20:11:43 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-07-11 20:11:43 (GMT)
commit67e7ada3117a43ffae831e172b5b061888da0e4e (patch)
tree356f8274e6536f873df6e3fa3081a60572791884
parentf05d42eac36a34e60487fbe207d64d0d9d771708 (diff)
Fix build without implicit cast to/from ascii
See the previous commits for details. This is the last part.
-rw-r--r--conf/dlgdebug.cpp4
-rw-r--r--conf/editannottooldialog.cpp2
-rw-r--r--extensions.cpp10
-rw-r--r--mobile/components/okularplugin.cpp2
-rw-r--r--part.cpp6
-rw-r--r--shell/shellutils.cpp2
6 files changed, 13 insertions, 13 deletions
diff --git a/conf/dlgdebug.cpp b/conf/dlgdebug.cpp
index b5b66b1..af1acc5 100644
--- a/conf/dlgdebug.cpp
+++ b/conf/dlgdebug.cpp
@@ -14,8 +14,8 @@
#define DEBUG_SIMPLE_BOOL( cfgname, layout ) \
{ \
- QCheckBox * foo = new QCheckBox( cfgname, this ); \
- foo->setObjectName( "kcfg_" cfgname ); \
+ QCheckBox * foo = new QCheckBox( QStringLiteral(cfgname), this ); \
+ foo->setObjectName( QStringLiteral("kcfg_" cfgname) ); \
layout->addWidget( foo ); \
}
diff --git a/conf/editannottooldialog.cpp b/conf/editannottooldialog.cpp
index 8742938..a6c6f77 100644
--- a/conf/editannottooldialog.cpp
+++ b/conf/editannottooldialog.cpp
@@ -259,7 +259,7 @@ QDomDocument EditAnnotToolDialog::toolXml() const
annotationElement.setAttribute( QStringLiteral("icon"), sa->stampIconName() );
}
- if ( opacity != "1" )
+ if ( opacity != QStringLiteral("1") )
annotationElement.setAttribute( QStringLiteral("opacity"), opacity );
return doc;
diff --git a/extensions.cpp b/extensions.cpp
index c5c0714..3c0d8a8 100644
--- a/extensions.cpp
+++ b/extensions.cpp
@@ -109,12 +109,12 @@ void OkularLiveConnectExtension::postMessage( const QStringList &args )
Q_FOREACH ( const QString &arg, args )
{
QString newarg = arg;
- newarg.replace( '\'', QLatin1String("\\'") );
- arrayargs.append( "\"" + newarg + "\"" );
+ newarg.replace( QLatin1Char('\''), QLatin1String("\\'") );
+ arrayargs.append( QLatin1Char('"') + newarg + QLatin1Char('"') );
}
- const QString arrayarg = '[' + arrayargs.join( QStringLiteral(", ") ) + ']';
- eval( "if (this.messageHandler && typeof this.messageHandler.onMessage == 'function') "
- "{ this.messageHandler.onMessage(" + arrayarg + ") }" );
+ const QString arrayarg = QLatin1Char('[') + arrayargs.join( QStringLiteral(", ") ) + QLatin1Char(']');
+ eval( QStringLiteral("if (this.messageHandler && typeof this.messageHandler.onMessage == 'function') "
+ "{ this.messageHandler.onMessage(") + arrayarg + QStringLiteral(") }") );
}
}
diff --git a/mobile/components/okularplugin.cpp b/mobile/components/okularplugin.cpp
index d124622..93d491e 100644
--- a/mobile/components/okularplugin.cpp
+++ b/mobile/components/okularplugin.cpp
@@ -28,7 +28,7 @@
void OkularPlugin::registerTypes(const char *uri)
{
- Q_ASSERT(uri == QLatin1String("org.kde.okular"));
+ Q_ASSERT(QString::fromLocal8Bit(uri) == QLatin1String("org.kde.okular"));
qmlRegisterType<DocumentItem>(uri, 2, 0, "DocumentItem");
qmlRegisterType<PageItem>(uri, 2, 0, "PageItem");
qmlRegisterType<ThumbnailItem>(uri, 2, 0, "ThumbnailItem");
diff --git a/part.cpp b/part.cpp
index 0dd663d..5c938dd 100644
--- a/part.cpp
+++ b/part.cpp
@@ -366,7 +366,7 @@ m_cliPresentation(false), m_cliPrint(false), m_embedMode(detectEmbedMode(parentW
// [left toolbox: Table of Contents] | []
m_toc = new TOC( 0, m_document );
connect( m_toc.data(), &TOC::hasTOC, this, &Part::enableTOC );
- m_sidebar->addItem( m_toc, QIcon::fromTheme(QApplication::isLeftToRight() ? "format-justify-left" : "format-justify-right"), i18n("Contents") );
+ m_sidebar->addItem( m_toc, QIcon::fromTheme(QApplication::isLeftToRight() ? QStringLiteral("format-justify-left") : QStringLiteral("format-justify-right")), i18n("Contents") );
enableTOC( false );
// [left toolbox: Layers] | []
@@ -1028,7 +1028,7 @@ void Part::slotJobStarted(KIO::Job *job)
if (job)
{
QStringList supportedMimeTypes = m_document->supportedMimeTypes();
- job->addMetaData(QStringLiteral("accept"), supportedMimeTypes.join(QStringLiteral(", ")) + ", */*;q=0.5");
+ job->addMetaData(QStringLiteral("accept"), supportedMimeTypes.join(QStringLiteral(", ")) + QStringLiteral(", */*;q=0.5"));
connect(job, &KJob::result, this, &Part::slotJobFinished);
}
@@ -2277,7 +2277,7 @@ void Part::slotSaveCopyAs()
if ( m_embedMode == PrintPreviewMode )
return;
- QUrl saveUrl = KFileDialog::getSaveUrl( QUrl("kfiledialog:///okular/" + url().fileName()),
+ QUrl saveUrl = KFileDialog::getSaveUrl( QUrl(QStringLiteral("kfiledialog:///okular/") + url().fileName()),
QString(), widget(), QString(),
KFileDialog::ConfirmOverwrite );
if ( saveUrl.isValid() && !saveUrl.isEmpty() )
diff --git a/shell/shellutils.cpp b/shell/shellutils.cpp
index 296a758..9debb2b 100644
--- a/shell/shellutils.cpp
+++ b/shell/shellutils.cpp
@@ -66,7 +66,7 @@ QUrl urlFromArg( const QString& _arg, FileExistFunc exist_func, const QString& p
// make sure something like http://example.org/foo#bar.pdf is treated as a path name
// but something like http://example.org/foo.pdf#bar is foo.pdf plus an anchor "bar"
if ( url.fragment().contains( QLatin1Char( '.' ) ) ) {
- url.setPath( url.path() + '#' + url.fragment() );
+ url.setPath( url.path() + QLatin1Char ( '#' ) + url.fragment() );
url.setFragment( QString() );
}
}