Browse Source

Added controlled conversions to char* instead of automatic ascii conversions.

The definition of -UTQT_NO_ASCII_CAST is no longer needed.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Slávek Banko 5 months ago
parent
commit
9d936b9bb4
Signed by: Slávek Banko <slavek.banko@axis.cz> GPG Key ID: 608F5293A04BE668
2 changed files with 14 additions and 12 deletions
  1. 1
    1
      CMakeLists.txt
  2. 13
    11
      src/tdmtheme.cpp

+ 1
- 1
CMakeLists.txt View File

@@ -56,7 +56,7 @@ include( ConfigureChecks.cmake )
56 56
 
57 57
 ###### global compiler settings
58 58
 
59
-add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST )
59
+add_definitions( -DHAVE_CONFIG_H )
60 60
 
61 61
 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
62 62
 set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )

+ 13
- 11
src/tdmtheme.cpp View File

@@ -270,12 +270,14 @@ void TDMThemeWidget::updateInfoView( ThemeData *theme )
270 270
 {
271 271
 	if(theme) {
272 272
 		info->setText(
273
-			((theme->copyright.length() > 0) ?
274
-				i18n("<qt><strong>Copyright:</strong> %1<br/></qt>",
275
-					theme->copyright) : "") +
276
-			((theme->description.length() > 0) ?
277
-				i18n("<qt><strong>Description:</strong> %1</qt>",
278
-					theme->description) : "") );
273
+			((theme->copyright.length() > 0)
274
+				? i18n("<qt><strong>Copyright:</strong> %1<br/></qt>")
275
+					.arg(theme->copyright)
276
+				: "") +
277
+			((theme->description.length() > 0)
278
+				? i18n("<qt><strong>Description:</strong> %1</qt>")
279
+					.arg(theme->description)
280
+				: "") );
279 281
 		preview->setPixmap( theme->path + '/' + theme->screenShot );
280 282
 		preview->setText( theme->screenShot.isEmpty() ?
281 283
 			i18n("Screenshot not available") : TQString() );
@@ -288,7 +290,7 @@ void TDMThemeWidget::updateInfoView( ThemeData *theme )
288 290
 
289 291
 void TDMThemeWidget::installNewTheme()
290 292
 {
291
-	KURLRequesterDlg fileRequester( TQString(), this, i18n("Drag or Type Theme URL") );
293
+	KURLRequesterDlg fileRequester( TQString(), this, i18n("Drag or Type Theme URL").utf8() );
292 294
 	fileRequester.urlRequester()->setMode( KFile::File | KFile::Directory | KFile::ExistingOnly );
293 295
 	KURL themeURL = fileRequester.getURL();
294 296
 	if (themeURL.isEmpty())
@@ -299,10 +301,10 @@ void TDMThemeWidget::installNewTheme()
299 301
 	if (!TDEIO::NetAccess::download( themeURL, themeTmpFile, this )) {
300 302
 		TQString sorryText;
301 303
 		if (themeURL.isLocalFile())
302
-			sorryText = i18n("Unable to find the TDM theme archive %1.",themeURL.prettyURL());
304
+			sorryText = i18n("Unable to find the TDM theme archive %1.").arg(themeURL.prettyURL());
303 305
 		else
304 306
 			sorryText = i18n("Unable to download the TDM theme archive;\n"
305
-			                 "please check that address %1 is correct.",themeURL.prettyURL());
307
+			                 "please check that address %1 is correct.").arg(themeURL.prettyURL());
306 308
 		KMessageBox::sorry( this, sorryText );
307 309
 		return;
308 310
 	}
@@ -330,7 +332,7 @@ void TDMThemeWidget::installNewTheme()
330 332
 		KMessageBox::error( this, i18n("The file is not a valid TDM theme archive.") );
331 333
 	else {
332 334
 		KProgressDialog progressDiag( this,
333
-			i18n("Installing TDM themes"), TQString() );
335
+			i18n("Installing TDM themes").utf8(), TQString() );
334 336
 		progressDiag.setModal( true );
335 337
 		progressDiag.setAutoClose( true );
336 338
 		progressDiag.progressBar()->setTotalSteps( foundThemes.count() );
@@ -338,7 +340,7 @@ void TDMThemeWidget::installNewTheme()
338 340
 
339 341
 		for ( KArchiveDirectory * ard = foundThemes.first(); foundThemes.current(); foundThemes.next() ) {
340 342
 			progressDiag.setLabel(
341
-				i18n("<qt>Installing <strong>%1</strong> theme</qt>", ard->name() ) );
343
+				i18n("<qt>Installing <strong>%1</strong> theme</qt>").arg(ard->name()) );
342 344
 
343 345
 			TQString path = themeDir + "themes/" + ard->name();
344 346
 			kdDebug() << "Unpacking new theme to " << path << endl;

Loading…
Cancel
Save