Fix FTBFS with stricter C++11.

This also fixes the inability to translate the description
of file types used in KFileDialog calls.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/4/head
Slávek Banko 5 years ago
parent 13e18cc4cc
commit 0e4dbeb2ed
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1608,7 +1608,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
TQString filename(TQFile::decodeName(cfgDir)+CONFIG_FILE);
if(!TQFile::exists(filename))
filename=TQFile::decodeName(cfgDir)+"../"OLD_CONFIG_FILE;
filename=TQFile::decodeName(cfgDir)+"../"+OLD_CONFIG_FILE;
return readConfig(filename, opts, defOpts);
}
}
@ -1631,7 +1631,7 @@ static bool readConfig(const char *file, Options *opts, Options *defOpts)
sprintf(filename, "%s"CONFIG_FILE, cfgDir);
if(!qtcFileExists(filename))
sprintf(filename, "%s../"OLD_CONFIG_FILE, cfgDir);
sprintf(filename, "%s../" OLD_CONFIG_FILE, cfgDir);
rv=readConfig(filename, opts, defOpts);
free(filename);
return rv;
@ -2300,7 +2300,7 @@ static bool fileExists(const char *path)
static const char * getSystemConfigFile()
{
static const char * constFiles[]={ /*"/etc/qt4/"OLD_CONFIG_FILE, "/etc/qt3/"OLD_CONFIG_FILE, "/etc/qt/"OLD_CONFIG_FILE,*/ "/etc/"OLD_CONFIG_FILE, NULL };
static const char * constFiles[]={ /*"/etc/qt4/" OLD_CONFIG_FILE, "/etc/qt3/" OLD_CONFIG_FILE, "/etc/qt/" OLD_CONFIG_FILE,*/ "/etc/" OLD_CONFIG_FILE, NULL };
int i;

@ -64,7 +64,7 @@ void CExportThemeDialog::slotOk()
KMessageBox::error(this, i18n("Name is empty!"));
else
{
TQString fileName(themeUrl->url()+"/"THEME_PREFIX+name+".themerc");
TQString fileName(themeUrl->url()+"/"+THEME_PREFIX+name+".themerc");
TDEConfig cfg(fileName, false, false);
bool rv(!cfg.isReadOnly());

@ -799,7 +799,7 @@ QtCurveConfig::~QtCurveConfig()
void QtCurveConfig::loadStyles(TQPopupMenu *menu)
{
TQStringList files(TDEGlobal::dirs()->findAllResources("data", "QtCurve/*"EXTENSION, false, true));
TQStringList files(TDEGlobal::dirs()->findAllResources("data", "QtCurve/*" EXTENSION, false, true));
files.sort();
@ -1374,9 +1374,11 @@ void QtCurveConfig::roundChanged()
void QtCurveConfig::importStyle()
{
TQString file(KFileDialog::getOpenFileName(TQString::null,
i18n("*"EXTENSION"|QtCurve Settings Files\n"
THEME_PREFIX"*"THEME_SUFFIX"|QtCurve TDE Theme Files"),
this));
TQString("*%1|").arg(EXTENSION)+
i18n("QtCurve Settings Files") + "\n" +
TQString("%2*%3|").arg(THEME_PREFIX).arg(THEME_SUFFIX)+
i18n("QtCurve TDE Theme Files"),
this));
if(!file.isEmpty())
loadStyle(file);
@ -1384,7 +1386,7 @@ void QtCurveConfig::importStyle()
void QtCurveConfig::exportStyle()
{
TQString file(KFileDialog::getSaveFileName(TQString::null, i18n("*"EXTENSION"|QtCurve Settings Files"), this));
TQString file(KFileDialog::getSaveFileName(TQString::null, TQString("*%1|").arg(EXTENSION)+i18n("QtCurve Settings Files"), this));
if(!file.isEmpty())
{

Loading…
Cancel
Save