qt5base-lts/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h
Marc Mutz 49b08f96e8 uic: use QStringLiteral() instead of QString::fromUtf8() where applicable
Many (most?) strings written aren't in fact UTF-8, and we can check at
compile-time which are and which aren't, so don't hard-code fromUtf8()
but use the much more efficient QStringLiteral() where applicable.

This is low-hanging fruit. This patch only optimises US-ASCII string
literals, not those that are latin-1 or even UTF-8, because that would
require more extensive changes to the original fixString() function.

Likewise, there are also other calls to QString::fromUtf8() being
generated (e.g. in the pixmap code) that could benefit from being
turned into QStringLiterals, but their code paths are more involved
than those this patch fixes.

This patch at least suffices in turning all the setObjectName()
arguments into QStringLiterals, which was the main goal.

The autotest baseline has been updated with the new expected results.

Change-Id: Ic1ef67f500f9ff92d36164d515f4e004ef2a10bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-20 15:17:08 +01:00

234 lines
8.7 KiB
C++

/********************************************************************************
** Form generated from reading UI file 'qsqlconnectiondialog.ui'
**
** Created: Fri Sep 4 10:17:14 2009
** by: Qt User Interface Compiler version 4.6.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef QSQLCONNECTIONDIALOG_H
#define QSQLCONNECTIONDIALOG_H
#include <QtCore/QVariant>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QButtonGroup>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QSpinBox>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_QSqlConnectionDialogUi
{
public:
QVBoxLayout *vboxLayout;
QGroupBox *connGroupBox;
QGridLayout *gridLayout;
QComboBox *comboDriver;
QLabel *textLabel4;
QLabel *textLabel2;
QLineEdit *editDatabase;
QSpinBox *portSpinBox;
QLabel *textLabel3;
QLineEdit *editPassword;
QLineEdit *editUsername;
QLineEdit *editHostname;
QLabel *textLabel5;
QLabel *textLabel5_2;
QLabel *textLabel4_2;
QHBoxLayout *hboxLayout;
QSpacerItem *spacerItem;
QCheckBox *dbCheckBox;
QHBoxLayout *hboxLayout1;
QSpacerItem *spacerItem1;
QPushButton *okButton;
QPushButton *cancelButton;
void setupUi(QDialog *QSqlConnectionDialogUi)
{
if (QSqlConnectionDialogUi->objectName().isEmpty())
QSqlConnectionDialogUi->setObjectName(QStringLiteral("QSqlConnectionDialogUi"));
QSqlConnectionDialogUi->resize(315, 302);
vboxLayout = new QVBoxLayout(QSqlConnectionDialogUi);
#ifndef Q_OS_MAC
vboxLayout->setSpacing(6);
#endif
vboxLayout->setContentsMargins(8, 8, 8, 8);
vboxLayout->setObjectName(QStringLiteral("vboxLayout"));
connGroupBox = new QGroupBox(QSqlConnectionDialogUi);
connGroupBox->setObjectName(QStringLiteral("connGroupBox"));
gridLayout = new QGridLayout(connGroupBox);
#ifndef Q_OS_MAC
gridLayout->setSpacing(6);
#endif
gridLayout->setContentsMargins(8, 8, 8, 8);
gridLayout->setObjectName(QStringLiteral("gridLayout"));
comboDriver = new QComboBox(connGroupBox);
comboDriver->setObjectName(QStringLiteral("comboDriver"));
gridLayout->addWidget(comboDriver, 0, 1, 1, 1);
textLabel4 = new QLabel(connGroupBox);
textLabel4->setObjectName(QStringLiteral("textLabel4"));
gridLayout->addWidget(textLabel4, 2, 0, 1, 1);
textLabel2 = new QLabel(connGroupBox);
textLabel2->setObjectName(QStringLiteral("textLabel2"));
gridLayout->addWidget(textLabel2, 0, 0, 1, 1);
editDatabase = new QLineEdit(connGroupBox);
editDatabase->setObjectName(QStringLiteral("editDatabase"));
gridLayout->addWidget(editDatabase, 1, 1, 1, 1);
portSpinBox = new QSpinBox(connGroupBox);
portSpinBox->setObjectName(QStringLiteral("portSpinBox"));
portSpinBox->setMaximum(65535);
portSpinBox->setMinimum(-1);
portSpinBox->setValue(-1);
gridLayout->addWidget(portSpinBox, 5, 1, 1, 1);
textLabel3 = new QLabel(connGroupBox);
textLabel3->setObjectName(QStringLiteral("textLabel3"));
gridLayout->addWidget(textLabel3, 1, 0, 1, 1);
editPassword = new QLineEdit(connGroupBox);
editPassword->setObjectName(QStringLiteral("editPassword"));
editPassword->setEchoMode(QLineEdit::Password);
gridLayout->addWidget(editPassword, 3, 1, 1, 1);
editUsername = new QLineEdit(connGroupBox);
editUsername->setObjectName(QStringLiteral("editUsername"));
gridLayout->addWidget(editUsername, 2, 1, 1, 1);
editHostname = new QLineEdit(connGroupBox);
editHostname->setObjectName(QStringLiteral("editHostname"));
gridLayout->addWidget(editHostname, 4, 1, 1, 1);
textLabel5 = new QLabel(connGroupBox);
textLabel5->setObjectName(QStringLiteral("textLabel5"));
gridLayout->addWidget(textLabel5, 4, 0, 1, 1);
textLabel5_2 = new QLabel(connGroupBox);
textLabel5_2->setObjectName(QStringLiteral("textLabel5_2"));
gridLayout->addWidget(textLabel5_2, 5, 0, 1, 1);
textLabel4_2 = new QLabel(connGroupBox);
textLabel4_2->setObjectName(QStringLiteral("textLabel4_2"));
gridLayout->addWidget(textLabel4_2, 3, 0, 1, 1);
vboxLayout->addWidget(connGroupBox);
hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout->setSpacing(6);
#endif
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setObjectName(QStringLiteral("hboxLayout"));
spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout->addItem(spacerItem);
dbCheckBox = new QCheckBox(QSqlConnectionDialogUi);
dbCheckBox->setObjectName(QStringLiteral("dbCheckBox"));
hboxLayout->addWidget(dbCheckBox);
vboxLayout->addLayout(hboxLayout);
hboxLayout1 = new QHBoxLayout();
#ifndef Q_OS_MAC
hboxLayout1->setSpacing(6);
#endif
hboxLayout1->setContentsMargins(0, 0, 0, 0);
hboxLayout1->setObjectName(QStringLiteral("hboxLayout1"));
spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem1);
okButton = new QPushButton(QSqlConnectionDialogUi);
okButton->setObjectName(QStringLiteral("okButton"));
okButton->setDefault(true);
hboxLayout1->addWidget(okButton);
cancelButton = new QPushButton(QSqlConnectionDialogUi);
cancelButton->setObjectName(QStringLiteral("cancelButton"));
hboxLayout1->addWidget(cancelButton);
vboxLayout->addLayout(hboxLayout1);
#ifndef QT_NO_SHORTCUT
textLabel4->setBuddy(editUsername);
textLabel2->setBuddy(comboDriver);
textLabel3->setBuddy(editDatabase);
textLabel5->setBuddy(editHostname);
textLabel5_2->setBuddy(portSpinBox);
textLabel4_2->setBuddy(editPassword);
#endif // QT_NO_SHORTCUT
QWidget::setTabOrder(comboDriver, editDatabase);
QWidget::setTabOrder(editDatabase, editUsername);
QWidget::setTabOrder(editUsername, editPassword);
QWidget::setTabOrder(editPassword, editHostname);
QWidget::setTabOrder(editHostname, portSpinBox);
QWidget::setTabOrder(portSpinBox, dbCheckBox);
QWidget::setTabOrder(dbCheckBox, okButton);
QWidget::setTabOrder(okButton, cancelButton);
retranslateUi(QSqlConnectionDialogUi);
QMetaObject::connectSlotsByName(QSqlConnectionDialogUi);
} // setupUi
void retranslateUi(QDialog *QSqlConnectionDialogUi)
{
QSqlConnectionDialogUi->setWindowTitle(QApplication::translate("QSqlConnectionDialogUi", "Connect...", 0, QApplication::UnicodeUTF8));
connGroupBox->setTitle(QApplication::translate("QSqlConnectionDialogUi", "Connection settings", 0, QApplication::UnicodeUTF8));
textLabel4->setText(QApplication::translate("QSqlConnectionDialogUi", "&Username:", 0, QApplication::UnicodeUTF8));
textLabel2->setText(QApplication::translate("QSqlConnectionDialogUi", "D&river", 0, QApplication::UnicodeUTF8));
portSpinBox->setSpecialValueText(QApplication::translate("QSqlConnectionDialogUi", "Default", 0, QApplication::UnicodeUTF8));
textLabel3->setText(QApplication::translate("QSqlConnectionDialogUi", "Database Name:", 0, QApplication::UnicodeUTF8));
textLabel5->setText(QApplication::translate("QSqlConnectionDialogUi", "&Hostname:", 0, QApplication::UnicodeUTF8));
textLabel5_2->setText(QApplication::translate("QSqlConnectionDialogUi", "P&ort:", 0, QApplication::UnicodeUTF8));
textLabel4_2->setText(QApplication::translate("QSqlConnectionDialogUi", "&Password:", 0, QApplication::UnicodeUTF8));
dbCheckBox->setText(QApplication::translate("QSqlConnectionDialogUi", "Us&e predefined in-memory database", 0, QApplication::UnicodeUTF8));
okButton->setText(QApplication::translate("QSqlConnectionDialogUi", "&OK", 0, QApplication::UnicodeUTF8));
cancelButton->setText(QApplication::translate("QSqlConnectionDialogUi", "&Cancel", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class QSqlConnectionDialogUi: public Ui_QSqlConnectionDialogUi {};
} // namespace Ui
QT_END_NAMESPACE
#endif // QSQLCONNECTIONDIALOG_H