summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-08-16 20:24:39 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-08-18 01:22:42 +0200
commit8cf5fe99d8b20f0683c62434fd5305b29e1dfa2f (patch)
tree083d3c0cd5d75f10a10c3463c14b061057cb8db2
parent776ef1e137b59624bfb902cfa3c427be976caed2 (diff)
downloadqalculate-tde-8cf5fe99.tar.gz
qalculate-tde-8cf5fe99.zip
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> (cherry picked from commit c9792a21add7beeb698ae43d71580e2943dac395)
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/preferences.cpp2
-rw-r--r--src/qalculateexportcsvdialog.cpp2
-rw-r--r--src/qalculatefunctionsdialog.cpp2
-rw-r--r--src/qalculateresultdisplay.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e1cd89..c037e6d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -59,7 +59,7 @@ include( ConfigureChecks.cmake )
###### global compiler settings
-add_definitions( -DHAVE_CONFIG_H -UQT_NO_ASCII_CAST )
+add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
diff --git a/src/preferences.cpp b/src/preferences.cpp
index e75ee66..c7d18f9 100644
--- a/src/preferences.cpp
+++ b/src/preferences.cpp
@@ -668,7 +668,7 @@ void save_preferences(bool mode) {
filename += "qalculate-tde.cfg";
file = fopen(filename.c_str(), "w+");
if(file == NULL) {
- fprintf(stderr, i18n("Couldn't write preferences to\n%s"), filename.c_str());
+ fprintf(stderr, i18n("Couldn't write preferences to\n%s").local8Bit(), filename.c_str());
return;
}
fprintf(file, "\n[General]\n");
diff --git a/src/qalculateexportcsvdialog.cpp b/src/qalculateexportcsvdialog.cpp
index a224ee8..7a2ffc6 100644
--- a/src/qalculateexportcsvdialog.cpp
+++ b/src/qalculateexportcsvdialog.cpp
@@ -152,7 +152,7 @@ void QalculateExportCSVDialog::slotOk() {
}
if(!CALCULATOR->exportCSV(*matrix_struct, str.ascii(), delimiter)) {
TQString error_str;
- error_str.sprintf(i18n("Could not export to file \n%s"), str.ascii());
+ error_str.sprintf(i18n("Could not export to file \n%s").utf8(), str.ascii());
KMessageBox::error(this, error_str);
reject();
}
diff --git a/src/qalculatefunctionsdialog.cpp b/src/qalculatefunctionsdialog.cpp
index d60c9be..7ea9e90 100644
--- a/src/qalculatefunctionsdialog.cpp
+++ b/src/qalculatefunctionsdialog.cpp
@@ -366,7 +366,7 @@ void QalculateFunctionsDialog::functionSelected() {
str += "<br>";
if(f->subtype() == SUBTYPE_DATA_SET) {
str += "<br>";
- str2.sprintf(i18n("Retrieves data from the %s data set for a given object and property. If \"info\" is typed as property, a dialog window will pop up with all properties of the object."), f->title().c_str());
+ str2.sprintf(i18n("Retrieves data from the %s data set for a given object and property. If \"info\" is typed as property, a dialog window will pop up with all properties of the object.").utf8(), f->title().c_str());
str2.replace("<", "&lt;");
str2.replace(">", "&gt;");
str += str2;
diff --git a/src/qalculateresultdisplay.cpp b/src/qalculateresultdisplay.cpp
index 0c7ccdf..f5515a5 100644
--- a/src/qalculateresultdisplay.cpp
+++ b/src/qalculateresultdisplay.cpp
@@ -146,7 +146,7 @@ TQString linkInfo(const MathStructure *m, TQWidget *w, bool full_length = false)
str += "<br>";
str += "<br>";
TQString str2;
- str2.sprintf(i18n("Retrieves data from the %s data set for a given object and property. If \"info\" is typed as property, a dialog window will pop up with all properties of the object."), f->title().c_str());
+ str2.sprintf(i18n("Retrieves data from the %s data set for a given object and property. If \"info\" is typed as property, a dialog window will pop up with all properties of the object.").utf8(), f->title().c_str());
str2.replace("<", "&lt;");
str2.replace(">", "&gt;");
str += str2;