From 9d936b9bb49200e398438118d93dd04111a4c840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 4 Nov 2018 16:06:56 +0100 Subject: Added controlled conversions to char* instead of automatic ascii conversions. The definition of -UTQT_NO_ASCII_CAST is no longer needed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- src/tdmtheme.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/tdmtheme.cpp') diff --git a/src/tdmtheme.cpp b/src/tdmtheme.cpp index 36973ee..03df749 100644 --- a/src/tdmtheme.cpp +++ b/src/tdmtheme.cpp @@ -270,12 +270,14 @@ void TDMThemeWidget::updateInfoView( ThemeData *theme ) { if(theme) { info->setText( - ((theme->copyright.length() > 0) ? - i18n("Copyright: %1
", - theme->copyright) : "") + - ((theme->description.length() > 0) ? - i18n("Description: %1", - theme->description) : "") ); + ((theme->copyright.length() > 0) + ? i18n("Copyright: %1
") + .arg(theme->copyright) + : "") + + ((theme->description.length() > 0) + ? i18n("Description: %1") + .arg(theme->description) + : "") ); preview->setPixmap( theme->path + '/' + theme->screenShot ); preview->setText( theme->screenShot.isEmpty() ? i18n("Screenshot not available") : TQString() ); @@ -288,7 +290,7 @@ void TDMThemeWidget::updateInfoView( ThemeData *theme ) void TDMThemeWidget::installNewTheme() { - KURLRequesterDlg fileRequester( TQString(), this, i18n("Drag or Type Theme URL") ); + KURLRequesterDlg fileRequester( TQString(), this, i18n("Drag or Type Theme URL").utf8() ); fileRequester.urlRequester()->setMode( KFile::File | KFile::Directory | KFile::ExistingOnly ); KURL themeURL = fileRequester.getURL(); if (themeURL.isEmpty()) @@ -299,10 +301,10 @@ void TDMThemeWidget::installNewTheme() if (!TDEIO::NetAccess::download( themeURL, themeTmpFile, this )) { TQString sorryText; if (themeURL.isLocalFile()) - sorryText = i18n("Unable to find the TDM theme archive %1.",themeURL.prettyURL()); + sorryText = i18n("Unable to find the TDM theme archive %1.").arg(themeURL.prettyURL()); else sorryText = i18n("Unable to download the TDM theme archive;\n" - "please check that address %1 is correct.",themeURL.prettyURL()); + "please check that address %1 is correct.").arg(themeURL.prettyURL()); KMessageBox::sorry( this, sorryText ); return; } @@ -330,7 +332,7 @@ void TDMThemeWidget::installNewTheme() KMessageBox::error( this, i18n("The file is not a valid TDM theme archive.") ); else { KProgressDialog progressDiag( this, - i18n("Installing TDM themes"), TQString() ); + i18n("Installing TDM themes").utf8(), TQString() ); progressDiag.setModal( true ); progressDiag.setAutoClose( true ); progressDiag.progressBar()->setTotalSteps( foundThemes.count() ); @@ -338,7 +340,7 @@ void TDMThemeWidget::installNewTheme() for ( KArchiveDirectory * ard = foundThemes.first(); foundThemes.current(); foundThemes.next() ) { progressDiag.setLabel( - i18n("Installing %1 theme", ard->name() ) ); + i18n("Installing %1 theme").arg(ard->name()) ); TQString path = themeDir + "themes/" + ard->name(); kdDebug() << "Unpacking new theme to " << path << endl; -- cgit v1.2.3