aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-07-30 14:12:24 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2017-07-30 14:12:24 +0200
commitca94e0cfc558f8667a1196f5e4c4c5ee6034684b (patch)
tree4259993e74e3a917fb07024f3b2a6fee2b66c0b1
parentAdded homepage and newtab to profile widget (diff)
downloadsmolbote-ca94e0cfc558f8667a1196f5e4c4c5ee6034684b.tar.xz
Updated documentation
-rw-r--r--BUILDING.md20
-rw-r--r--CONTRIBUTING.md3
-rw-r--r--README.md7
-rw-r--r--docs/Design Notes.md35
-rw-r--r--docs/manual.md31
-rw-r--r--src/browser.cpp2
-rw-r--r--src/main.cpp21
7 files changed, 78 insertions, 41 deletions
diff --git a/BUILDING.md b/BUILDING.md
index 8118420..d701a7d 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -1,8 +1,12 @@
## Building
+### Dependencies
+* Qt, over 5.9, up-to-date Qt version recommended
+* qbs, over 1.8.0
+
### Tools
-* Qt
-* gcc on linux, msvc on windows
+* Qt: core, widgets, webengine, webenginewidgets
+* gcc or clang on linux, msvc on windows
* qbs
### Configuration
@@ -48,6 +52,18 @@ QT_DIR\QT_VER\msvc2015_64\windeployqt.exe build-PROFILE\release\qtbrowser.exe
```
* grsecurity: You may need to exception qbs.
+An optional system proxy should be picked up automatically. However, for proxies
+that require a username or password, you need to connect to
+QWebEnginePage::proxyAuthenticationRequired.
+
+Qt WebEngine Widgets uses the Qt Quick Scene Graph to compose the page.
+Therefore, OpenGL support is required.
+And that's also why QML is a dependancy.
+
+To use clang with QtCreator, you need to change the compiler in
+Build & Run » Kits, not the qbs profile.
+
+
## Packaging
### Tarball
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1cfe4ab..5e4cdb2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -11,6 +11,9 @@ Please include the following when reporting bugs:
## Contributing
+### General code rules
+* Use generic formats
+
### Hooks
Symlink the hooks:
```
diff --git a/README.md b/README.md
index c707401..26881dd 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,7 @@
_yet another Qt browser_
### What is this and why should I care?
-It is supposed to be:
-
+The aim is to create a small, fast and clean web browser.
* minimal - just a browser, not a platform
* configurable - settings file in plain sight and plain text
@@ -12,3 +11,7 @@ It's a small boat.
### Sounds dumb, how do I use it?
You make it yourself after taking a cursory glance at BUILDING.md.
+
+### Reporting bugs, or throwing code into the pot
+Use the facilities present at the repository. For more information, glance at
+CONTRIBUTING.md.
diff --git a/docs/Design Notes.md b/docs/Design Notes.md
deleted file mode 100644
index 62bb44f..0000000
--- a/docs/Design Notes.md
+++ /dev/null
@@ -1,35 +0,0 @@
-## Features
-The aim of this project is to provide a small and fast web browser.
-
-### General
-* Use generic formats
-
-### Version 1.0
-* Profiles
- - Application-level profile manager
- - System-level and user-level profile config, with per-profile overrides [todo]
-* Configuration
- - Default system-level config and user-level overrides [todo]
-* Cookies
- - Filter list similar to the URL filter list [todo]
-* Tabs
- - Moving tabs between windows [todo]
- - Tab context menu [todo]
-* Page actions
- - Search [todo]
- - Zoom [todo]
- - Print [todo]
-* Navigation toolbar
- - Back and Forward history [todo]
-
-## Dependencies
-* Qt, over 5.7 (up-to-date Qt version recommended)
-* qbs, over 1.6.0 (Qt 5.7)
-
-## Notes
-An optional system proxy should be picked up automatically. However, for proxies that require a username or password, you need to connect to QWebEnginePage::proxyAuthenticationRequired.
-
-Qt WebEngine Widgets uses the Qt Quick Scene Graph to compose the page. Therefore, OpenGL support is required.
-And that's also why QML is a dependancy.
-
-To use clang with QtCreator, you need to change the compiler in Build & Run » Kits, not the qbs profile.
diff --git a/docs/manual.md b/docs/manual.md
new file mode 100644
index 0000000..971ba94
--- /dev/null
+++ b/docs/manual.md
@@ -0,0 +1,31 @@
+### Command-line parameters
+ Parameter | Description | Usage
+-----------------|---------------------------------|-------
+-h | Display help information |
+-v, --version | Display version information |
+-c, --config | Set a custom configuration file |
+--default-config | Print default configuration | Useful for writing user overrides.
+-p, --profile | Select a profile |
+-n, --no-plugins | Don't load plugins on startup |
+--new-instance | Skip instance check on startup |
+--in-new-window | Open URL in a new window |
+--in-new-tab | Open URL in a new tab |
+
+
+### Version 1.0
+* Profiles
+ - Application-level profile manager
+ - System-level and user-level profile config, with per-profile overrides [todo]
+* Configuration
+ - Default system-level config and user-level overrides [todo]
+* Cookies
+ - Filter list similar to the URL filter list [todo]
+* Tabs
+ - Moving tabs between windows [todo]
+ - Tab context menu [todo]
+* Page actions
+ - Search [todo]
+ - Zoom [todo]
+ - Print [todo]
+* Navigation toolbar
+ - Back and Forward history [todo]
diff --git a/src/browser.cpp b/src/browser.cpp
index 0ea36d8..0c4191f 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -193,6 +193,7 @@ void Browser::setConfigPath(const QString &path)
m_settings = new Settings(configLocation, defaultsLocation);
+#ifdef QT_DEBUG
if(m_settings->isEmpty()) {
// There are no keys in the settings
QMessageBox::information(0,
@@ -200,6 +201,7 @@ void Browser::setConfigPath(const QString &path)
tr("The configuration file <i>%1</i> is empty.<br>"
"Using default values from <i>%2</i>.").arg(configLocation, defaultsLocation));
}
+#endif
}
MainWindow *Browser::mainWindow()
diff --git a/src/main.cpp b/src/main.cpp
index bf4c29f..960c11c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -25,6 +25,7 @@
int main(int argc, char *argv[])
{
+ //
Browser app(argc, argv);
if(app.isRunning()) {
qDebug("Another instance is running, returning...");
@@ -35,14 +36,30 @@ int main(int argc, char *argv[])
parser.setApplicationDescription("yet another Qt browser");
parser.addHelpOption();
parser.addVersionOption();
- parser.addPositionalArgument("URL", "URL(s) to open");
+
QCommandLineOption configOption(QStringList() << "c" << "config", "Set configuration file.", "PATH");
parser.addOption(configOption);
+
+ QCommandLineOption defaultConfigOption(QStringList() << "default-config", "Print default configuration");
+ parser.addOption(defaultConfigOption);
+
QCommandLineOption profileOption(QStringList() << "p" << "profile", "Use this profile.", "PROFILE");
parser.addOption(profileOption);
- QCommandLineOption nopluginsOption(QStringList() << "n" << "noplugins", "Don't load plugins");
+
+ QCommandLineOption nopluginsOption(QStringList() << "n" << "no-plugins", "Don't load plugins");
parser.addOption(nopluginsOption);
+ QCommandLineOption newInstanceOption(QStringList() << "new-instance", "Skip instance check at startup");
+ parser.addOption(newInstanceOption);
+
+ QCommandLineOption newWindowOption(QStringList() << "in-new-window", "Open URL in new window");
+ parser.addOption(newWindowOption);
+
+ QCommandLineOption newTabOption(QStringList() << "in-new-tab", "Open URL in new tab");
+ parser.addOption(newTabOption);
+
+ parser.addPositionalArgument("URL", "URL(s) to open");
+
parser.process(app);
app.setWindowIcon(QIcon(QLatin1String(":/icon.svg")));