GUI: Saving queries: work around qt 5.9-11 (at least) bug: defaultSuffix is not appended
This commit is contained in:
parent
218b3fbfe2
commit
34f5ee8740
@ -88,7 +88,14 @@ void RclMain::saveLastQuery()
|
|||||||
|
|
||||||
string tofile((const char *)s.toLocal8Bit());
|
string tofile((const char *)s.toLocal8Bit());
|
||||||
|
|
||||||
LOGDEB("RclMain::saveLastQuery: XML: [" << (xml) << "]\n" );
|
// Work around qt 5.9-11 bug (linux at least): defaultSuffix is
|
||||||
|
// not added to saved file name
|
||||||
|
string suff = path_suffix(tofile);
|
||||||
|
if (suff.compare("rclq")) {
|
||||||
|
tofile += ".rclq";
|
||||||
|
}
|
||||||
|
|
||||||
|
LOGDEB("RclMain::saveLastQuery: XML: [" << xml << "]\n");
|
||||||
string reason;
|
string reason;
|
||||||
if (!stringtofile(xml, tofile.c_str(), reason)) {
|
if (!stringtofile(xml, tofile.c_str(), reason)) {
|
||||||
QMessageBox::warning(this, tr("Write failed"),
|
QMessageBox::warning(this, tr("Write failed"),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user