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>
pull/1/head
Slávek Banko 6 years ago
parent 4beda4d404
commit 9d936b9bb4
Signed by: SlavekB
GPG Key ID: 608F5293A04BE668

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

@ -270,12 +270,14 @@ void TDMThemeWidget::updateInfoView( ThemeData *theme )
{ {
if(theme) { if(theme) {
info->setText( info->setText(
((theme->copyright.length() > 0) ? ((theme->copyright.length() > 0)
i18n("<qt><strong>Copyright:</strong> %1<br/></qt>", ? i18n("<qt><strong>Copyright:</strong> %1<br/></qt>")
theme->copyright) : "") + .arg(theme->copyright)
((theme->description.length() > 0) ? : "") +
i18n("<qt><strong>Description:</strong> %1</qt>", ((theme->description.length() > 0)
theme->description) : "") ); ? i18n("<qt><strong>Description:</strong> %1</qt>")
.arg(theme->description)
: "") );
preview->setPixmap( theme->path + '/' + theme->screenShot ); preview->setPixmap( theme->path + '/' + theme->screenShot );
preview->setText( theme->screenShot.isEmpty() ? preview->setText( theme->screenShot.isEmpty() ?
i18n("Screenshot not available") : TQString() ); i18n("Screenshot not available") : TQString() );
@ -288,7 +290,7 @@ void TDMThemeWidget::updateInfoView( ThemeData *theme )
void TDMThemeWidget::installNewTheme() 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 ); fileRequester.urlRequester()->setMode( KFile::File | KFile::Directory | KFile::ExistingOnly );
KURL themeURL = fileRequester.getURL(); KURL themeURL = fileRequester.getURL();
if (themeURL.isEmpty()) if (themeURL.isEmpty())
@ -299,10 +301,10 @@ void TDMThemeWidget::installNewTheme()
if (!TDEIO::NetAccess::download( themeURL, themeTmpFile, this )) { if (!TDEIO::NetAccess::download( themeURL, themeTmpFile, this )) {
TQString sorryText; TQString sorryText;
if (themeURL.isLocalFile()) 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 else
sorryText = i18n("Unable to download the TDM theme archive;\n" 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 ); KMessageBox::sorry( this, sorryText );
return; return;
} }
@ -330,7 +332,7 @@ void TDMThemeWidget::installNewTheme()
KMessageBox::error( this, i18n("The file is not a valid TDM theme archive.") ); KMessageBox::error( this, i18n("The file is not a valid TDM theme archive.") );
else { else {
KProgressDialog progressDiag( this, KProgressDialog progressDiag( this,
i18n("Installing TDM themes"), TQString() ); i18n("Installing TDM themes").utf8(), TQString() );
progressDiag.setModal( true ); progressDiag.setModal( true );
progressDiag.setAutoClose( true ); progressDiag.setAutoClose( true );
progressDiag.progressBar()->setTotalSteps( foundThemes.count() ); progressDiag.progressBar()->setTotalSteps( foundThemes.count() );
@ -338,7 +340,7 @@ void TDMThemeWidget::installNewTheme()
for ( KArchiveDirectory * ard = foundThemes.first(); foundThemes.current(); foundThemes.next() ) { for ( KArchiveDirectory * ard = foundThemes.first(); foundThemes.current(); foundThemes.next() ) {
progressDiag.setLabel( progressDiag.setLabel(
i18n("<qt>Installing <strong>%1</strong> theme</qt>", ard->name() ) ); i18n("<qt>Installing <strong>%1</strong> theme</qt>").arg(ard->name()) );
TQString path = themeDir + "themes/" + ard->name(); TQString path = themeDir + "themes/" + ard->name();
kdDebug() << "Unpacking new theme to " << path << endl; kdDebug() << "Unpacking new theme to " << path << endl;

Loading…
Cancel
Save