forked from qt-creator/qt-creator
Add some more constants and make use where possible. More to come.
This commit is contained in:
@@ -106,7 +106,7 @@ QWidget *GeneralSettingsPage::createPage(QWidget *parent)
|
|||||||
m_homePage = engine.customValue(QLatin1String("HomePage"), QString()).toString();
|
m_homePage = engine.customValue(QLatin1String("HomePage"), QString()).toString();
|
||||||
if (m_homePage.isEmpty()) {
|
if (m_homePage.isEmpty()) {
|
||||||
m_homePage = engine.customValue(QLatin1String("DefaultHomePage"),
|
m_homePage = engine.customValue(QLatin1String("DefaultHomePage"),
|
||||||
QLatin1String("about:blank")).toString();
|
Help::Constants::AboutBlank).toString();
|
||||||
}
|
}
|
||||||
m_ui.homePageLineEdit->setText(m_homePage);
|
m_ui.homePageLineEdit->setText(m_homePage);
|
||||||
|
|
||||||
@@ -178,7 +178,7 @@ void GeneralSettingsPage::apply()
|
|||||||
|
|
||||||
QString homePage = m_ui.homePageLineEdit->text();
|
QString homePage = m_ui.homePageLineEdit->text();
|
||||||
if (homePage.isEmpty())
|
if (homePage.isEmpty())
|
||||||
homePage = QLatin1String("about:blank");
|
homePage = Help::Constants::AboutBlank;
|
||||||
engine->setCustomValue(QLatin1String("HomePage"), homePage);
|
engine->setCustomValue(QLatin1String("HomePage"), homePage);
|
||||||
|
|
||||||
const int startOption = m_ui.helpStartComboBox->currentIndex();
|
const int startOption = m_ui.helpStartComboBox->currentIndex();
|
||||||
@@ -199,7 +199,7 @@ void GeneralSettingsPage::setCurrentPage()
|
|||||||
|
|
||||||
void GeneralSettingsPage::setBlankPage()
|
void GeneralSettingsPage::setBlankPage()
|
||||||
{
|
{
|
||||||
m_ui.homePageLineEdit->setText(QLatin1String("about:blank"));
|
m_ui.homePageLineEdit->setText(Help::Constants::AboutBlank);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralSettingsPage::setDefaultPage()
|
void GeneralSettingsPage::setDefaultPage()
|
||||||
|
|||||||
@@ -35,6 +35,16 @@
|
|||||||
namespace Help {
|
namespace Help {
|
||||||
namespace Constants {
|
namespace Constants {
|
||||||
|
|
||||||
|
enum {
|
||||||
|
ShowHomePage = 0,
|
||||||
|
ShowBlankPage = 1,
|
||||||
|
ShowLastPages = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
static const QLatin1String ListSeparator("|");
|
||||||
|
static const QLatin1String DefaultZoomFactor("0.0");
|
||||||
|
static const QLatin1String AboutBlank("about:blank");
|
||||||
|
|
||||||
const int P_MODE_HELP = 70;
|
const int P_MODE_HELP = 70;
|
||||||
const char * const ID_MODE_HELP = "Help";
|
const char * const ID_MODE_HELP = "Help";
|
||||||
const char * const HELP_CATEGORY = "H.Help";
|
const char * const HELP_CATEGORY = "H.Help";
|
||||||
|
|||||||
Reference in New Issue
Block a user