summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-06-15 16:43:44 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-06-15 16:43:48 +0200
commit0e4dbeb2ed74ecace9cfa664315e89bfead41b34 (patch)
tree5f458de41aa6f7ba23ed0fd0225f9f237af524e1
parent13e18cc4ccc8120a40dac168c6d88c7f1faed203 (diff)
downloadtde-style-qtcurve-0e4dbeb2.tar.gz
tde-style-qtcurve-0e4dbeb2.zip
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>
-rw-r--r--common/config_file.c6
-rw-r--r--config/exportthemedialog.cpp2
-rw-r--r--config/qtcurveconfig.cpp12
3 files changed, 11 insertions, 9 deletions
diff --git a/common/config_file.c b/common/config_file.c
index 91a9108..95e31ef 100644
--- a/common/config_file.c
+++ b/common/config_file.c
@@ -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;
diff --git a/config/exportthemedialog.cpp b/config/exportthemedialog.cpp
index 32bd2e5..ccb9cce 100644
--- a/config/exportthemedialog.cpp
+++ b/config/exportthemedialog.cpp
@@ -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());
diff --git a/config/qtcurveconfig.cpp b/config/qtcurveconfig.cpp
index 68e7c7a..4d9329e 100644
--- a/config/qtcurveconfig.cpp
+++ b/config/qtcurveconfig.cpp
@@ -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())
{