diff options
-rw-r--r-- | smolbote.qbs | 55 | ||||
-rw-r--r-- | src/forms/profileview.cpp | 5 | ||||
-rw-r--r-- | src/lib/navigation/urllineedit.cpp | 4 | ||||
-rw-r--r-- | src/mainwindow.cpp | 4 | ||||
-rw-r--r-- | src/webengine/webview.cpp | 2 | ||||
-rw-r--r-- | src/widgets/mainwindowmenubar.cpp | 2 | ||||
-rw-r--r-- | src/widgets/webviewtabbar.cpp | 2 |
7 files changed, 23 insertions, 51 deletions
diff --git a/smolbote.qbs b/smolbote.qbs index f00b930..8229ba3 100644 --- a/smolbote.qbs +++ b/smolbote.qbs @@ -29,6 +29,20 @@ Project { name: "libconfig++" } + Probe { + id: git + property string version: "" + property string describe: "" + configure: { + if(project.gitVersion) { + var meta = GitRepo.read(project.sourceDirectory); + version = meta.version; + describe = meta.describe; + found = true; + } + } + } + CppApplication { id: poi name: "poi" @@ -46,22 +60,8 @@ Project { Depends { name: "settings" } Depends { name: "settingsDialog" } - Probe { - id: git - property string version: "" - property string describe: "" - configure: { - if(project.gitVersion) { - var meta = GitRepo.read(project.sourceDirectory); - version = meta.version; - describe = meta.describe; - found = true; - } - } - } - // global includes - cpp.includePaths: ['src', 'src/3rd-party', 'src/lib', 'lib'] + cpp.includePaths: ['src', 'src/lib', 'lib'] // global defines cpp.defines: { if(project.deprecatedWarnings) @@ -120,31 +120,6 @@ Project { ] } -/* - Group { - name: "Request Filter" - files: [ - "src/filter/blockermanager.cpp", - "src/filter/blockermanager.h", - "src/filter/filtercollection.cpp", - "src/filter/filtercollection.h", - "src/filter/filtertree.cpp", - "src/filter/filtertree.h", - "src/filter/regexp.cpp", - "src/filter/regexp.h", - "src/filter/subscriptiondialog.ui", - "src/filter/subscriptionform.ui", - "src/webengine/urlinterceptor.cpp", - "src/webengine/urlinterceptor.h", - ] - cpp.defines: { - if(project.deprecatedWarnings) - defines.push("QT_DEPRECATED_WARNINGS", "QT_DISABLE_DEPRECATED_BEFORE="+project.deprecatedBefore); - defines.push("DEBUG_VERBOSE") - return defines; - } - } -*/ Group { name: "Profile" files: [ diff --git a/src/forms/profileview.cpp b/src/forms/profileview.cpp index 2695311..6977b61 100644 --- a/src/forms/profileview.cpp +++ b/src/forms/profileview.cpp @@ -57,10 +57,7 @@ ProfileView::~ProfileView() void ProfileView::setProfile(WebEngineProfile *profile) { - if(!profile) { - return; - } - //Q_ASSERT(profile); + Q_CHECK_PTR(profile); m_profile = profile; setWindowTitle(m_profile->name()); diff --git a/src/lib/navigation/urllineedit.cpp b/src/lib/navigation/urllineedit.cpp index 4244866..c587f43 100644 --- a/src/lib/navigation/urllineedit.cpp +++ b/src/lib/navigation/urllineedit.cpp @@ -89,13 +89,13 @@ UrlLineEdit::UrlLineEdit(QWidget *parent) : QAction *UrlLineEdit::sslAction() { - Q_ASSERT(m_sslAction != nullptr); + Q_CHECK_PTR(m_sslAction); return m_sslAction; } QAction *UrlLineEdit::pageAction() { - Q_ASSERT(m_pageAction != nullptr); + Q_CHECK_PTR(m_pageAction); return m_pageAction; } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4d3870c..70dc7ea 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -229,7 +229,7 @@ void MainWindow::showSettingsDialog() void MainWindow::setProfile(WebEngineProfile *profile) { - Q_ASSERT(profile != nullptr); + Q_CHECK_PTR(profile); tabBar->setProfile(profile); } @@ -267,7 +267,7 @@ void MainWindow::toggleFullscreen() void MainWindow::handleTabChanged(WebView *view) { - Q_ASSERT(view != nullptr); + Q_CHECK_PTR(view); m_currentView = view; diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index 281ccec..50041b8 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -42,7 +42,7 @@ WebView::~WebView() QMenu *WebView::menu() { - Q_ASSERT(m_pageMenu != nullptr); + Q_CHECK_PTR(m_pageMenu); return m_pageMenu; } diff --git a/src/widgets/mainwindowmenubar.cpp b/src/widgets/mainwindowmenubar.cpp index 2f6c1af..aef61b4 100644 --- a/src/widgets/mainwindowmenubar.cpp +++ b/src/widgets/mainwindowmenubar.cpp @@ -30,7 +30,7 @@ MainWindowMenuBar::MainWindowMenuBar(std::shared_ptr<Configuration> config, Main QMenuBar(parent) { Q_ASSERT(config); - Q_ASSERT(parent); + Q_CHECK_PTR(parent); // Browser menu QMenu *browserMenu = new QMenu(qApp->applicationName(), this); diff --git a/src/widgets/webviewtabbar.cpp b/src/widgets/webviewtabbar.cpp index f8d3dc1..0baf68a 100644 --- a/src/widgets/webviewtabbar.cpp +++ b/src/widgets/webviewtabbar.cpp @@ -86,7 +86,7 @@ int WebViewTabBar::addTab(const QUrl &url) void WebViewTabBar::setProfile(WebEngineProfile *profile) { - Q_ASSERT(profile != nullptr); + Q_CHECK_PTR(profile); m_profile = profile; for(auto view : qAsConst(m_views)) { |