WSL/SLF GitLab Repository

Commit 116d1f77 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Fixing some warnings revealed by the new debug compilation flags

parent 8a8bc565
......@@ -353,140 +353,140 @@ void PreviewWindow::createMenu()
/* TRANSFORM menu */
QMenu *menu_transform = this->menuBar()->addMenu(tr("&Transform"));
/* Whitespaces menu */
auto *transform_whitespaces = new QMenu(tr("Whitespaces"), menu_transform);
transform_whitespaces->setIcon( getIcon("markasblank") );
menu_transform->addMenu(transform_whitespaces);
auto *transform_transform_singlews = new QAction(getIcon("unmarkasblank"), tr("To single spaces"), transform_whitespaces);
auto *trans_whitespaces = new QMenu(tr("Whitespaces"), menu_transform);
trans_whitespaces->setIcon( getIcon("markasblank") );
menu_transform->addMenu(trans_whitespaces);
auto *transform_transform_singlews = new QAction(getIcon("unmarkasblank"), tr("To single spaces"), trans_whitespaces);
connect(transform_transform_singlews, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_whitespace_singlews"); } );
transform_whitespaces->addAction(transform_transform_singlews);
trans_whitespaces->addAction(transform_transform_singlews);
auto *transform_transform_longestws = new QAction(tr("Adapt to longest keys"),
transform_whitespaces);
trans_whitespaces);
connect(transform_transform_longestws, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_whitespace_longestws"); } );
transform_whitespaces->addAction(transform_transform_longestws);
trans_whitespaces->addAction(transform_transform_longestws);
/* Sort */
auto *transform_sort = new QMenu(tr("Sort"), menu_transform);
transform_sort->setIcon( getIcon("view-sort") );
menu_transform->addMenu(transform_sort);
auto *transform_sort_alphabetically = new QAction(tr("Alphabetically"), transform_sort);
auto *trans_sort = new QMenu(tr("Sort"), menu_transform);
trans_sort->setIcon( getIcon("view-sort") );
menu_transform->addMenu(trans_sort);
auto *transform_sort_alphabetically = new QAction(tr("Alphabetically"), trans_sort);
connect(transform_sort_alphabetically, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_sort_alphabetically"); } );
transform_sort->addAction(transform_sort_alphabetically);
auto *transform_sort_order = new QAction(tr("In order of INI file"), transform_sort);
trans_sort->addAction(transform_sort_alphabetically);
auto *transform_sort_order = new QAction(tr("In order of INI file"), trans_sort);
connect(transform_sort_order, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_sort_order"); } );
transform_sort->addAction(transform_sort_order);
trans_sort->addAction(transform_sort_order);
/* Capitalization menu */
auto *transform_capitalization = new QMenu(tr("Capitalization"), menu_transform);
menu_transform->addMenu(transform_capitalization);
auto *trans_capitalization = new QMenu(tr("Capitalization"), menu_transform);
menu_transform->addMenu(trans_capitalization);
auto *transform_capitalization_sections_upper = new QAction(
tr("Sections to upper case"), transform_capitalization);
tr("Sections to upper case"), trans_capitalization);
connect(transform_capitalization_sections_upper, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_capitalization_sections_upper"); } );
transform_capitalization->addAction(transform_capitalization_sections_upper);
trans_capitalization->addAction(transform_capitalization_sections_upper);
auto *transform_capitalization_sections_lower = new QAction(
tr("Sections to lower case"), transform_capitalization);
tr("Sections to lower case"), trans_capitalization);
connect(transform_capitalization_sections_lower, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_capitalization_sections_lower"); } );
transform_capitalization->addAction(transform_capitalization_sections_lower);
trans_capitalization->addAction(transform_capitalization_sections_lower);
auto *transform_capitalization_keys_upper = new QAction(
tr("Keys to upper case"), transform_capitalization);
tr("Keys to upper case"), trans_capitalization);
connect(transform_capitalization_keys_upper, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_capitalization_keys_upper"); } );
transform_capitalization->addAction(transform_capitalization_keys_upper);
trans_capitalization->addAction(transform_capitalization_keys_upper);
auto *transform_capitalization_keys_lower = new QAction(
tr("Keys to lower case"), transform_capitalization);
tr("Keys to lower case"), trans_capitalization);
connect(transform_capitalization_keys_lower, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_capitalization_keys_lower"); } );
transform_capitalization->addAction(transform_capitalization_keys_lower);
trans_capitalization->addAction(transform_capitalization_keys_lower);
auto *transform_capitalization_values_upper = new QAction(
tr("Values to upper case"), transform_capitalization);
tr("Values to upper case"), trans_capitalization);
connect(transform_capitalization_values_upper, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_capitalization_values_upper"); } );
transform_capitalization->addAction(transform_capitalization_values_upper);
trans_capitalization->addAction(transform_capitalization_values_upper);
auto *transform_capitalization_values_lower = new QAction(
tr("Values to lower case"), transform_capitalization);
tr("Values to lower case"), trans_capitalization);
connect(transform_capitalization_values_lower, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_capitalization_values_lower"); } );
transform_capitalization->addAction(transform_capitalization_values_lower);
transform_capitalization->addSeparator();
trans_capitalization->addAction(transform_capitalization_values_lower);
trans_capitalization->addSeparator();
auto *transform_capitalization_upper = new QAction(getIcon("format-text-uppercase"),
tr("All to upper case"), transform_capitalization);
tr("All to upper case"), trans_capitalization);
connect(transform_capitalization_upper, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_capitalization_upper"); } );
transform_capitalization->addAction(transform_capitalization_upper);
trans_capitalization->addAction(transform_capitalization_upper);
auto *transform_capitalization_lower = new QAction(getIcon("format-text-lowercase"),
tr("All to lower case"), transform_capitalization);
tr("All to lower case"), trans_capitalization);
connect(transform_capitalization_lower, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_capitalization_lower"); } );
transform_capitalization->addAction(transform_capitalization_lower);
trans_capitalization->addAction(transform_capitalization_lower);
/* Comments menu */
auto *transform_comments = new QMenu(tr("Comments"), menu_transform);
transform_comments->setIcon( getIcon("code-context") );
menu_transform->addMenu(transform_comments);
auto *transform_comment_block = new QAction(tr("Comment selection"));
transform_comments->addAction(transform_comment_block);
transform_comment_block->setShortcut(Qt::CTRL + Qt::Key_NumberSign);
connect(transform_comment_block, &QAction::triggered, this,
auto *trans_comments = new QMenu(tr("Comments"), menu_transform);
trans_comments->setIcon( getIcon("code-context") );
menu_transform->addMenu(trans_comments);
auto *trans_comment_block = new QAction(tr("Comment selection"));
trans_comments->addAction(trans_comment_block);
trans_comment_block->setShortcut(Qt::CTRL + Qt::Key_NumberSign);
connect(trans_comment_block, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_comment_block"); });
auto *transform_uncomment_block = new QAction(tr("Uncomment selection"));
transform_comments->addAction(transform_uncomment_block);
transform_uncomment_block->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_NumberSign);
connect(transform_uncomment_block, &QAction::triggered, this,
auto *trans_uncomment_block = new QAction(tr("Uncomment selection"));
trans_comments->addAction(trans_uncomment_block);
trans_uncomment_block->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_NumberSign);
connect(trans_uncomment_block, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_uncomment_block"); });
transform_comments->addSeparator();
auto *transform_comments_content = new QAction(tr("Comment all content"),
transform_comments);
connect(transform_comments_content, &QAction::triggered, this,
trans_comments->addSeparator();
auto *trans_comments_content = new QAction(tr("Comment all content"),
trans_comments);
connect(trans_comments_content, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_comments_content"); } );
transform_comments->addAction(transform_comments_content);
auto *transform_comments_duplicate = new QAction(tr("Duplicate all to comment"),
transform_comments);
transform_comments_duplicate->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_B);
connect(transform_comments_duplicate, &QAction::triggered, this,
trans_comments->addAction(trans_comments_content);
auto *trans_comments_duplicate = new QAction(tr("Duplicate all to comment"),
trans_comments);
trans_comments_duplicate->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_B);
connect(trans_comments_duplicate, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_comments_duplicate"); } );
transform_comments->addAction(transform_comments_duplicate);
auto *transform_comments_move_values = new QAction(tr("Move next to values"),
transform_comments);
connect(transform_comments_move_values, &QAction::triggered, this,
trans_comments->addAction(trans_comments_duplicate);
auto *trans_comments_move_values = new QAction(tr("Move next to values"),
trans_comments);
connect(trans_comments_move_values, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_comments_move_value"); } );
transform_comments->addAction(transform_comments_move_values);
auto *transform_comments_move_end = new QAction(tr("Collect at bottom"),
transform_comments);
connect(transform_comments_move_end, &QAction::triggered, this,
trans_comments->addAction(trans_comments_move_values);
auto *trans_comments_move_end = new QAction(tr("Collect at bottom"),
trans_comments);
connect(trans_comments_move_end, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_comments_move_end"); } );
transform_comments->addAction(transform_comments_move_end);
auto *transform_comments_trim = new QAction(getIcon("edit-clear-all"), tr("Trim"), transform_comments);
connect(transform_comments_trim, &QAction::triggered, this,
trans_comments->addAction(trans_comments_move_end);
auto *trans_comments_trim = new QAction(getIcon("edit-clear-all"), tr("Trim"), trans_comments);
connect(trans_comments_trim, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_comments_trim"); } );
transform_comments->addAction(transform_comments_trim);
auto *transform_comments_delete = new QAction(tr("Delete all"), transform_comments);
connect(transform_comments_delete, &QAction::triggered, this,
trans_comments->addAction(trans_comments_trim);
auto *trans_comments_delete = new QAction(tr("Delete all"), trans_comments);
connect(trans_comments_delete, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_comments_delete"); } );
transform_comments->addAction(transform_comments_delete);
transform_comments->addSeparator();
auto *transform_comments_numbersign = new QAction(tr("Switch to #"), transform_comments);
connect(transform_comments_numbersign, &QAction::triggered, this,
trans_comments->addAction(trans_comments_delete);
trans_comments->addSeparator();
auto *trans_comments_numbersign = new QAction(tr("Switch to #"), trans_comments);
connect(trans_comments_numbersign, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_comments_numbersign"); } );
transform_comments->addAction(transform_comments_numbersign);
auto *transform_comments_semicolon = new QAction(tr("Switch to ;"), transform_comments);
connect(transform_comments_semicolon, &QAction::triggered, this,
trans_comments->addAction(trans_comments_numbersign);
auto *trans_comments_semicolon = new QAction(tr("Switch to ;"), trans_comments);
connect(trans_comments_semicolon, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_comments_semicolon"); } );
transform_comments->addAction(transform_comments_semicolon);
trans_comments->addAction(trans_comments_semicolon);
/* Reset menu */
auto *transform_reset = new QMenu(tr("Reset"), menu_transform);
transform_reset->setIcon( getIcon("view-refresh") );
menu_transform->addMenu(transform_reset);
auto *trans_reset = new QMenu(tr("Reset"), menu_transform);
trans_reset->setIcon( getIcon("view-refresh") );
menu_transform->addMenu(trans_reset);
auto *transform_reset_original = new QAction(tr("To original INI on file system"),
transform_reset);
trans_reset);
connect(transform_reset_original, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_reset_original"); } );
transform_reset->addAction(transform_reset_original);
transform_reset_full_ = new QAction(tr("To full INI with GUI keys"), transform_reset);
trans_reset->addAction(transform_reset_original);
transform_reset_full_ = new QAction(tr("To full INI with GUI keys"), trans_reset);
connect(transform_reset_full_, &QAction::triggered, this,
[=]{ onTransformMenuClick("transform_reset_full"); } );
transform_reset->addAction(transform_reset_full_);
trans_reset->addAction(transform_reset_full_);
/* CONVERT menu */
QMenu *menu_convert = this->menuBar()->addMenu(tr("&Convert"));
......
......@@ -631,12 +631,12 @@ QString WorkflowPanel::setReferencePath(const QPushButton *button, const QString
*/
QString WorkflowPanel::getWidgetValue(QWidget *widget) const
{
if (auto *wid = qobject_cast<QDateTimeEdit *>(widget))
return wid->dateTime().toString(Qt::DateFormat::ISODate);
else if (auto *wid = qobject_cast<QLineEdit *>(widget))
return wid->text();
else if (auto *wid = qobject_cast<QCheckBox *>(widget))
return (wid->checkState() == Qt::Checked? "TRUE" : "FALSE");
if (auto *wid1 = qobject_cast<QDateTimeEdit *>(widget))
return wid1->dateTime().toString(Qt::DateFormat::ISODate);
else if (auto *wid2 = qobject_cast<QLineEdit *>(widget))
return wid2->text();
else if (auto *wid3 = qobject_cast<QCheckBox *>(widget))
return (wid3->checkState() == Qt::Checked? "TRUE" : "FALSE");
return QString();
}
......
......@@ -135,9 +135,9 @@ class INIParser {
public:
INIParser() = default; //careful: caller must set logger afterwards!
INIParser(Logger *in_logger) : logger_instance_(in_logger) {}
INIParser(Logger *in_logger) : logger_instance_(in_logger), filename_(), sections_(), block_comment_at_end_(), equality_check_msg_() {}
INIParser(const QString &in_file, Logger *in_logger) :
logger_instance_(in_logger) { parseFile(in_file); }
logger_instance_(in_logger), filename_(), sections_(), block_comment_at_end_(), equality_check_msg_() { parseFile(in_file); }
bool operator==(const INIParser &other);
bool operator!=(const INIParser &other){ return !(*this == other); }
void setLogger(Logger *in_logger) { logger_instance_ = in_logger; }
......@@ -176,7 +176,7 @@ class INIParser {
bool first_error_message_ = true; //to prepend INI file info if an error occurs
Logger *logger_instance_ = nullptr;
QString filename_ = QString();
QString filename_;
SectionList sections_;
QString block_comment_at_end_; //a final comment that is not followed by any key or section anymore
QString equality_check_msg_; //when INIParsers are compared this transports a hint as to what's different
......
......@@ -144,11 +144,11 @@ void XMLReader::parseReferences()
/**
* @brief Parse include files in an XML.
* @details This function scans an XML document for our own simple include system.
* @param[in] xml_ XML document to check for include files.
* @param[in] xml_input XML document to check for include files.
* @param[in] parent_file The parent file this file is included in.
* @param[out] xml_error XML operations error string to add to.
*/
void XMLReader::parseIncludes(const QDomDocument &xml_, const QString &parent_file, QString &xml_error)
void XMLReader::parseIncludes(const QDomDocument &xml_input, const QString &parent_file, QString &xml_error)
{
/*
* XML documents are scanned for the "<include file="..."/>" tag. If found, the file
......@@ -165,7 +165,7 @@ void XMLReader::parseIncludes(const QDomDocument &xml_, const QString &parent_fi
//We use a while loop here and re-search "include" nodes after each insertion, because the
//replacements invalidate XML iterators of a for loop.
while (true) {
const auto include_element( xml_.firstChildElement().firstChildElement("include") );
const auto include_element( xml_input.firstChildElement().firstChildElement("include") );
if (include_element.isNull())
break;
const QString include_file_name( include_element.toElement().attribute("file") );
......
......@@ -43,7 +43,7 @@ class XMLReader {
QString read(QFile &file, QString &xml_error, const bool &no_references = false);
QString read(const QString &filename, QString &xml_error, const bool &no_references = false);
void parseReferences();
void parseIncludes(const QDomDocument &xml_, const QString &parent_file, QString &xml_error);
void parseIncludes(const QDomDocument &xml_input, const QString &parent_file, QString &xml_error);
QString parseAutoloadIni() const;
QDomDocumentFragment fragmentFromNodeChildren(const QDomNode &node);
static QDomNode prependParent(const QDomNode &child);
......
......@@ -61,7 +61,7 @@ struct CaseInsensitiveCompare {
*/
class MessageHandler : public QAbstractMessageHandler {
public:
MessageHandler() : QAbstractMessageHandler(nullptr) {}
MessageHandler() : QAbstractMessageHandler(nullptr), description_(), location_() {}
QString status() const { return description_; }
int line() const { return static_cast<int>(location_.line()); }
int column() const { return static_cast<int>(location_.column()); }
......
......@@ -56,14 +56,14 @@ bool KeyPressFilter::eventFilter(QObject *object, QEvent *event)
* this hidden value contributes. Here, we prevent this.
*/
object->setProperty("empty", "false"); //necessary if entered number happens to be the hidden value
if (auto *spinbox = qobject_cast<QSpinBox *>(object)) { //try both types
spinbox->parent()->setProperty("ini_value", key_event->key() - Qt::Key_0);
spinbox->style()->unpolish(spinbox);
spinbox->style()->polish(spinbox);
} else if (auto *spinbox = qobject_cast<QDoubleSpinBox *>(object)) {
spinbox->parent()->setProperty("ini_value", key_event->key() - Qt::Key_0);
spinbox->style()->unpolish(spinbox);
spinbox->style()->polish(spinbox);
if (auto *spinbox1 = qobject_cast<QSpinBox *>(object)) { //try both types
spinbox1->parent()->setProperty("ini_value", key_event->key() - Qt::Key_0);
spinbox1->style()->unpolish(spinbox1);
spinbox1->style()->polish(spinbox1);
} else if (auto *spinbox2 = qobject_cast<QDoubleSpinBox *>(object)) {
spinbox2->parent()->setProperty("ini_value", key_event->key() - Qt::Key_0);
spinbox2->style()->unpolish(spinbox2);
spinbox2->style()->polish(spinbox2);
}
return true; //we have already input the value - prevent 2nd time
} //endif property
......@@ -207,22 +207,22 @@ void Number::setDefaultPanelStyles(const QString &in_value)
void Number::clear(const bool &set_default)
{
QString def_number_val;
if (auto *spinbox = qobject_cast<QSpinBox *>(number_element_)) {
if (spinbox->minimum() > 0)
def_number_val = QString::number(spinbox->minimum());
else if (spinbox->maximum() < 0)
def_number_val = QString::number(spinbox->maximum());
if (auto *spinbox1 = qobject_cast<QSpinBox *>(number_element_)) {
if (spinbox1->minimum() > 0)
def_number_val = QString::number(spinbox1->minimum());
else if (spinbox1->maximum() < 0)
def_number_val = QString::number(spinbox1->maximum());
else
def_number_val = "0";
spinbox->setValue(def_number_val.toInt());
} else if (auto *spinbox = qobject_cast<QDoubleSpinBox *>(number_element_)) {
if (spinbox->minimum() > 0)
def_number_val = QString::number(spinbox->minimum());
else if (spinbox->maximum() < 0)
def_number_val = QString::number(spinbox->maximum());
spinbox1->setValue(def_number_val.toInt());
} else if (auto *spinbox2 = qobject_cast<QDoubleSpinBox *>(number_element_)) {
if (spinbox2->minimum() > 0)
def_number_val = QString::number(spinbox2->minimum());
else if (spinbox2->maximum() < 0)
def_number_val = QString::number(spinbox2->maximum());
else
def_number_val = "0";
spinbox->setValue(def_number_val.toDouble());
spinbox2->setValue(def_number_val.toDouble());
}
expression_element_->setText(QString());
......@@ -464,7 +464,7 @@ void Number::onPropertySet()
return;
}
if (auto *spinbox = qobject_cast<QSpinBox *>(number_element_)) { //integer
if (auto *spinbox1 = qobject_cast<QSpinBox *>(number_element_)) { //integer
bool convert_success;
int ival = str_value.toInt(&convert_success);
if (!convert_success) { //could also stem from XML, but let's not clutter the message for users
......@@ -473,17 +473,17 @@ void Number::onPropertySet()
topStatus(tr("Invalid numeric INI value"), "warning");
return;
}
if (ival < spinbox->minimum() || ival > spinbox->maximum()) {
if (ival < spinbox1->minimum() || ival > spinbox1->maximum()) {
topLog(tr(R"(Integer INI value out of range for key "%1::%2" - truncated)").arg(
section_, key_), "warning");
topStatus(tr("Truncated numeric INI value"), "warning");
}
spinbox->setValue(str_value.toInt());
if (ival == spinbox->minimum()) {
spinbox1->setValue(str_value.toInt());
if (ival == spinbox1->minimum()) {
emit checkValue(ival); //if the default isn't changed from zero then nothing would be emitted
QTimer::singleShot(1, this, [=]{ setEmpty(false); }); //avoid keeping empty style when default val is minimum spinbox val
QTimer::singleShot(1, this, [=]{ setEmpty(false); }); //avoid keeping empty style when default val is minimum spinbox1 val
}
} else if (auto *spinbox = qobject_cast<QDoubleSpinBox *>(number_element_)) { //floating point
} else if (auto *spinbox2 = qobject_cast<QDoubleSpinBox *>(number_element_)) { //floating point
bool convert_success;
double dval = str_value.toDouble(&convert_success);
if (!convert_success) {
......@@ -492,7 +492,7 @@ void Number::onPropertySet()
topStatus(tr("Invalid numeric INI value"), "warning");
return;
}
if (dval < spinbox->minimum() || dval > spinbox->maximum()) {
if (dval < spinbox2->minimum() || dval > spinbox2->maximum()) {
topLog(tr(R"(Double INI value out of range for key "%1::%2" - truncated)").arg(
section_, key_), "warning");
topStatus(tr("Truncated numeric INI value"), "warning");
......@@ -500,22 +500,22 @@ void Number::onPropertySet()
const int ini_precision = getPrecisionOfNumber(str_value); //read number of decimal in INI
//this also enables to overwrite in expression mode; no default in XML --> use smaller ones too:
if (ini_precision > spinbox->decimals()) {
if (ini_precision > spinbox2->decimals()) {
precision_ = ini_precision;
spinbox->setDecimals(precision_);
spinbox2->setDecimals(precision_);
}
//allow to switch back to a smaller number of digits for new INI files:
if (spinbox->decimals() > std::max(ini_precision, default_precision_)) {
if (spinbox2->decimals() > std::max(ini_precision, default_precision_)) {
precision_ = std::max(ini_precision, default_precision_);
if (precision_ == 0)
precision_ = 1; //force at least 1 digit
spinbox->setDecimals(precision_);
spinbox2->setDecimals(precision_);
}
spinbox->setValue(str_value.toDouble());
spinbox->setDecimals(precision_); //needs to be re-set every time
spinbox2->setValue(str_value.toDouble());
spinbox2->setDecimals(precision_); //needs to be re-set every time
if (qFuzzyCompare(dval, spinbox->minimum())) { //fuzzy against warnings
if (qFuzzyCompare(dval, spinbox2->minimum())) { //fuzzy against warnings
emit checkValue(dval); //cf. above
QTimer::singleShot(1, this, [=]{ setEmpty(false); });
}
......
......@@ -61,7 +61,7 @@ Textfield::Textfield(const QString &section, const QString &key, const QDomNode
validity_button_ = new QToolButton; //a button that can pop up if the text has a certain format
validity_button_->setStyleSheet("* {border: none}");
QSize sz_label;
sz_label.setWidth(static_cast<int>(fontMetrics().boundingRect(Cst::u_globe).width()) * 1.2);
sz_label.setWidth(static_cast<int>(fontMetrics().boundingRect(Cst::u_globe).width() * 1.2));
sz_label.setHeight(static_cast<int>(fontMetrics().boundingRect(Cst::u_globe).height()));
validity_button_->setFixedSize(sz_label);
validity_button_->setFocusPolicy(Qt::NoFocus); //unexpected tab stops when invisible otherwise
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment