mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-22 20:49:59 +01:00
fix compile issues
This commit is contained in:
@@ -16,8 +16,9 @@
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "propertiesinterface.h"
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
/*!
|
||||
* Available property types
|
||||
*/
|
||||
namespace {
|
||||
|
||||
@@ -43,8 +43,8 @@ class PropertiesInterface
|
||||
befor the name of each paramètre
|
||||
@param QString
|
||||
*/
|
||||
virtual void toSettings (QSettings &settings,
|
||||
const QString = QString()) const =0;
|
||||
virtual void toSettings(QSettings &,
|
||||
const QString & = QString()) const =0;
|
||||
/**
|
||||
@brief fromSettings
|
||||
load properties to setting file.
|
||||
@@ -52,8 +52,8 @@ class PropertiesInterface
|
||||
befor the name of each paramètre
|
||||
@param QString
|
||||
*/
|
||||
virtual void fromSettings (const QSettings &settings,
|
||||
const QString = QString()) =0;
|
||||
virtual void fromSettings(QSettings &,
|
||||
const QString & = QString()) = 0;
|
||||
/**
|
||||
@brief toXml
|
||||
Save properties to xml element
|
||||
|
||||
@@ -41,7 +41,7 @@ void TerminalData::setParent(QGraphicsObject* parent)
|
||||
@param settings UNUSED
|
||||
@param prefix UNUSED
|
||||
*/
|
||||
void TerminalData::toSettings(QSettings &settings, const QString prefix) const
|
||||
void TerminalData::toSettings(QSettings &settings, const QString &prefix) const
|
||||
|
||||
{
|
||||
Q_UNUSED(settings);
|
||||
@@ -56,7 +56,7 @@ void TerminalData::toSettings(QSettings &settings, const QString prefix) const
|
||||
@param settings UNUSED
|
||||
@param prefix UNUSED
|
||||
*/
|
||||
void TerminalData::fromSettings(const QSettings &settings, const QString prefix)
|
||||
void TerminalData::fromSettings(QSettings &settings, const QString& prefix)
|
||||
{
|
||||
Q_UNUSED(settings);
|
||||
Q_UNUSED(prefix);
|
||||
@@ -134,8 +134,7 @@ bool TerminalData::fromXml (const QDomElement &xml_element) // RETURNS True
|
||||
|
||||
// read the orientation of the terminal
|
||||
// lit l'orientation de la borne
|
||||
m_orientation = Qet::orientationFromString(
|
||||
xml_element.attribute("orientation"));
|
||||
m_orientation = orientationFromString(o);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ class TerminalData : public PropertiesInterface
|
||||
|
||||
void setParent(QGraphicsObject* parent);
|
||||
void toSettings(QSettings &settings,
|
||||
const QString prefix = QString()) const override;
|
||||
void toSettings(QSettings &settings, const QString& = QString()) const override;
|
||||
void fromSettings(const QSettings &settings, const QString& = QString()) override;
|
||||
const QString& prefix = QString()) const override;
|
||||
void fromSettings(QSettings &settings,
|
||||
const QString& = QString()) override;
|
||||
QDomElement toXml(QDomDocument &xml_element) const override;
|
||||
bool fromXml(const QDomElement &xml_element) override;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ XRefProperties::XRefProperties()
|
||||
@param prefix: prefix before properties name
|
||||
*/
|
||||
void XRefProperties::toSettings(QSettings &settings,
|
||||
const QString prefix) const
|
||||
const QString &prefix) const
|
||||
{
|
||||
settings.setValue(prefix + "showpowerctc", m_show_power_ctc);
|
||||
QString display = m_display == Cross? "cross" : "contacts";
|
||||
@@ -65,8 +65,8 @@ void XRefProperties::toSettings(QSettings &settings,
|
||||
@param settings: QSettings to use
|
||||
@param prefix: prefix before properties name
|
||||
*/
|
||||
void XRefProperties::fromSettings(const QSettings &settings,
|
||||
const QString prefix)
|
||||
void XRefProperties::fromSettings(QSettings &settings,
|
||||
const QString &prefix)
|
||||
{
|
||||
m_show_power_ctc = settings.value(prefix + "showpowerctc", true).toBool();
|
||||
QString display = settings.value(prefix + "displayhas", "cross").toString();
|
||||
@@ -147,7 +147,7 @@ bool XRefProperties::fromXml(const QDomElement &xml_element) {
|
||||
propertyString(xml_element, "slave_label", &m_slave_label);
|
||||
QString value;
|
||||
foreach (QString key, m_prefix_keys) {
|
||||
if (!propertyString(xml_element, key + "prefix", &value));
|
||||
if (!propertyString(xml_element, key + "prefix", &value))
|
||||
m_prefix.insert(key, value);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -42,10 +42,9 @@ class XRefProperties : public PropertiesInterface
|
||||
Label
|
||||
};
|
||||
|
||||
void toSettings (QSettings &settings, const QString& = QString()) const override;
|
||||
void fromSettings (const QSettings &settings, const QString& = QString()) override;
|
||||
void fromSettings (const QSettings &settings,
|
||||
const QString = QString()) override;
|
||||
void toSettings (QSettings &settings, const QString& = QString()) const override;
|
||||
void fromSettings (QSettings &settings,
|
||||
const QString& = QString()) override;
|
||||
QDomElement toXml (QDomDocument &xml_document) const override;
|
||||
bool fromXml(const QDomElement &xml_element) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user