Skip to content
Snippets Groups Projects
Commit 89d20924 authored by kh1's avatar kh1
Browse files

Add some more constants and make use where possible. More to come.

parent 8b96dbf7
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ QWidget *GeneralSettingsPage::createPage(QWidget *parent)
m_homePage = engine.customValue(QLatin1String("HomePage"), QString()).toString();
if (m_homePage.isEmpty()) {
m_homePage = engine.customValue(QLatin1String("DefaultHomePage"),
QLatin1String("about:blank")).toString();
Help::Constants::AboutBlank).toString();
}
m_ui.homePageLineEdit->setText(m_homePage);
......@@ -178,7 +178,7 @@ void GeneralSettingsPage::apply()
QString homePage = m_ui.homePageLineEdit->text();
if (homePage.isEmpty())
homePage = QLatin1String("about:blank");
homePage = Help::Constants::AboutBlank;
engine->setCustomValue(QLatin1String("HomePage"), homePage);
const int startOption = m_ui.helpStartComboBox->currentIndex();
......@@ -199,7 +199,7 @@ void GeneralSettingsPage::setCurrentPage()
void GeneralSettingsPage::setBlankPage()
{
m_ui.homePageLineEdit->setText(QLatin1String("about:blank"));
m_ui.homePageLineEdit->setText(Help::Constants::AboutBlank);
}
void GeneralSettingsPage::setDefaultPage()
......
......@@ -35,6 +35,16 @@
namespace Help {
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 char * const ID_MODE_HELP = "Help";
const char * const HELP_CATEGORY = "H.Help";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment