Huge refactorings...
This commit is contained in:
parent
f837e43d07
commit
a0dc1e1d66
@ -1,10 +1,11 @@
|
||||
#include "core/basenetworkaccessmanager.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
#include <QNetworkProxy>
|
||||
#include <QNetworkRequest>
|
||||
|
||||
#include "core/settings.h"
|
||||
#include "core/defs.h"
|
||||
#include "core/basenetworkaccessmanager.h"
|
||||
|
||||
|
||||
BaseNetworkAccessManager::BaseNetworkAccessManager(QObject *parent)
|
||||
: QNetworkAccessManager(parent) {
|
||||
|
@ -1,10 +1,11 @@
|
||||
#include <QNetworkReply>
|
||||
#include <QWebFrame>
|
||||
#include "core/basewebpage.h"
|
||||
|
||||
#include "core/webbrowsernetworkaccessmanager.h"
|
||||
#include "core/basewebpage.h"
|
||||
#include "gui/webbrowser.h"
|
||||
|
||||
#include <QNetworkReply>
|
||||
#include <QWebFrame>
|
||||
|
||||
|
||||
BaseWebPage::BaseWebPage(QObject *parent)
|
||||
: QWebPage(parent) {
|
||||
|
@ -1,13 +1,14 @@
|
||||
#include "core/databasefactory.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include <QSqlQuery>
|
||||
#include <QSqlError>
|
||||
#include <QVariant>
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/databasefactory.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
|
||||
QPointer<DatabaseFactory> DatabaseFactory::s_instance;
|
||||
|
||||
@ -74,8 +75,6 @@ QSqlDatabase DatabaseFactory::initialize(const QString &connection_name) {
|
||||
else {
|
||||
QSqlQuery query_db(database);
|
||||
|
||||
// TODO: smazat QSQLDatabase::exec() všude
|
||||
// a nahradit jej funkcí QSQLquery::exec()
|
||||
query_db.exec("PRAGMA encoding = \"UTF-8\"");
|
||||
query_db.exec("PRAGMA synchronous = OFF");
|
||||
query_db.exec("PRAGMA journal_mode = MEMORY");
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include "core/debugging.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/debugging.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include <QAction>
|
||||
|
||||
#include "core/dynamicshortcuts.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
|
||||
DynamicShortcuts::DynamicShortcuts() {
|
||||
|
@ -1,16 +1,17 @@
|
||||
#include "core/feedsmodel.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/databasefactory.h"
|
||||
#include "core/feedsmodelstandardcategory.h"
|
||||
#include "core/feedsmodelstandardfeed.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "gui/iconfactory.h"
|
||||
|
||||
#include <QSqlError>
|
||||
#include <QSqlQuery>
|
||||
#include <QSqlRecord>
|
||||
#include <QPair>
|
||||
|
||||
#include "core/feedsmodel.h"
|
||||
#include "core/feedsmodelstandardcategory.h"
|
||||
#include "core/feedsmodelstandardfeed.h"
|
||||
#include "core/defs.h"
|
||||
#include "core/databasefactory.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "gui/iconfactory.h"
|
||||
|
||||
|
||||
FeedsModel::FeedsModel(QObject *parent) : QAbstractItemModel(parent) {
|
||||
setObjectName("FeedsModel");
|
||||
@ -330,7 +331,7 @@ QHash<int, FeedsModelCategory *> FeedsModel::getCategories() {
|
||||
void FeedsModel::assembleFeeds(FeedAssignment feeds) {
|
||||
QHash<int, FeedsModelCategory*> categories = getCategories();
|
||||
|
||||
foreach (FeedAssignmentItem feed, feeds) {
|
||||
foreach (const FeedAssignmentItem &feed, feeds) {
|
||||
if (feed.first == NO_PARENT_CATEGORY) {
|
||||
// This is top-level feed, add it to the root item.
|
||||
m_rootItem->appendChild(feed.second);
|
||||
|
@ -1,9 +1,10 @@
|
||||
#include <QQueue>
|
||||
|
||||
#include "core/feedsmodelcategory.h"
|
||||
|
||||
#include "core/feedsmodelstandardcategory.h"
|
||||
#include "core/feedsmodelstandardfeed.h"
|
||||
|
||||
#include <QQueue>
|
||||
|
||||
|
||||
FeedsModelCategory::FeedsModelCategory(FeedsModelRootItem *parent_item)
|
||||
: FeedsModelRootItem(parent_item) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
#ifndef FEEDSMODELCLASSICCATEGORY_H
|
||||
#define FEEDSMODELCLASSICCATEGORY_H
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
#include "core/feedsmodelrootitem.h"
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
|
||||
class FeedsModelFeed;
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
#include "core/feedsmodelfeed.h"
|
||||
|
||||
#include "core/databasefactory.h"
|
||||
|
||||
#include <QSqlDatabase>
|
||||
#include <QSqlQuery>
|
||||
#include <QSqlError>
|
||||
#include <QVariant>
|
||||
|
||||
#include "core/databasefactory.h"
|
||||
#include "core/feedsmodelfeed.h"
|
||||
|
||||
|
||||
FeedsModelFeed::FeedsModelFeed(FeedsModelRootItem *parent_item)
|
||||
: FeedsModelRootItem(parent_item), m_totalCount(0), m_unreadCount(0) {
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include <QVariant>
|
||||
#include "core/feedsmodelrootitem.h"
|
||||
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
#include "core/feedsmodelrootitem.h"
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
|
||||
FeedsModelRootItem::FeedsModelRootItem(FeedsModelRootItem *parent_item)
|
||||
|
@ -1,10 +1,11 @@
|
||||
#include <QVariant>
|
||||
|
||||
#include "core/textfactory.h"
|
||||
#include "core/feedsmodelstandardcategory.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/textfactory.h"
|
||||
#include "gui/iconfactory.h"
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
|
||||
FeedsModelStandardCategory::FeedsModelStandardCategory(FeedsModelRootItem *parent_item)
|
||||
: FeedsModelCategory(parent_item) {
|
||||
|
@ -1,11 +1,11 @@
|
||||
#ifndef FEEDSMODELSTANDARDCATEGORY_H
|
||||
#define FEEDSMODELSTANDARDCATEGORY_H
|
||||
|
||||
#include "core/feedsmodelcategory.h"
|
||||
|
||||
#include <QSqlRecord>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "core/feedsmodelcategory.h"
|
||||
|
||||
|
||||
// Represents STANDARD category container.
|
||||
// Standard category container can contain:
|
||||
|
@ -1,9 +1,10 @@
|
||||
#include <QVariant>
|
||||
#include "core/feedsmodelstandardfeed.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "gui/iconfactory.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "core/feedsmodelstandardfeed.h"
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
|
||||
FeedsModelStandardFeed::FeedsModelStandardFeed(FeedsModelRootItem *parent_item)
|
||||
|
@ -1,11 +1,11 @@
|
||||
#ifndef FEEDSMODELSTANDARDFEED_H
|
||||
#define FEEDSMODELSTANDARDFEED_H
|
||||
|
||||
#include "core/feedsmodelfeed.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QSqlRecord>
|
||||
|
||||
#include "core/feedsmodelfeed.h"
|
||||
|
||||
|
||||
// Represents STANDARD RSS/RDF/ATOM feed with no
|
||||
// online synchronization services (NO TT-RSS, NO FEEDLY).
|
||||
|
@ -1,9 +1,10 @@
|
||||
#include "core/feedsproxymodel.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/feedsmodel.h"
|
||||
#include "core/feedsmodelcategory.h"
|
||||
#include "core/feedsmodelfeed.h"
|
||||
#include "core/feedsmodelrootitem.h"
|
||||
#include "core/defs.h"
|
||||
|
||||
|
||||
FeedsProxyModel::FeedsProxyModel(QObject *parent)
|
||||
|
@ -1,12 +1,13 @@
|
||||
#include "core/localization.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
|
||||
#include <QTranslator>
|
||||
#include <QDir>
|
||||
#include <QFileInfoList>
|
||||
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
#include "core/localization.h"
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
|
||||
Localization::Localization() {
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include <QSqlRecord>
|
||||
#include <QSqlError>
|
||||
#include <QSqlQuery>
|
||||
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
#include "core/messagesmodel.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/textfactory.h"
|
||||
#include "core/messagesmodel.h"
|
||||
#include "core/databasefactory.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
|
||||
#include <QSqlRecord>
|
||||
#include <QSqlError>
|
||||
#include <QSqlQuery>
|
||||
|
||||
|
||||
MessagesModel::MessagesModel(QObject *parent)
|
||||
|
@ -1,13 +1,13 @@
|
||||
#ifndef MESSAGESMODEL_H
|
||||
#define MESSAGESMODEL_H
|
||||
|
||||
#include "core/defs.h"
|
||||
|
||||
#include <QSqlTableModel>
|
||||
#include <QFont>
|
||||
#include <QIcon>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "core/defs.h"
|
||||
|
||||
|
||||
// Represents single message.
|
||||
class Message {
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "core/messagesproxymodel.h"
|
||||
|
||||
#include "core/messagesmodel.h"
|
||||
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
#include "core/parsingfactory.h"
|
||||
|
||||
#include "core/textfactory.h"
|
||||
|
||||
#include <QDomDocument>
|
||||
#include <QDomElement>
|
||||
|
||||
#include "core/parsingfactory.h"
|
||||
#include "core/textfactory.h"
|
||||
|
||||
|
||||
ParsingFactory::ParsingFactory() {
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
#ifndef PARSINGFACTORY_H
|
||||
#define PARSINGFACTORY_H
|
||||
|
||||
#include <QNetworkReply>
|
||||
|
||||
#include "core/messagesmodel.h"
|
||||
|
||||
#include <QList>
|
||||
|
||||
|
||||
class ParsingFactory {
|
||||
private:
|
||||
|
@ -1,12 +1,13 @@
|
||||
#include "core/settings.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QPointer>
|
||||
#include <QWebSettings>
|
||||
|
||||
#include "core/settings.h"
|
||||
#include "core/defs.h"
|
||||
|
||||
|
||||
QPointer<Settings> Settings::s_instance;
|
||||
|
||||
|
@ -1,16 +1,18 @@
|
||||
#include "core/systemfactory.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
|
||||
#include <QSettings>
|
||||
#endif
|
||||
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QApplication>
|
||||
#include <QReadWriteLock>
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <QSettings>
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
#endif
|
||||
|
||||
#include "core/systemfactory.h"
|
||||
#include "core/defs.h"
|
||||
|
||||
|
||||
QPointer<SystemFactory> SystemFactory::s_instance;
|
||||
|
||||
@ -125,7 +127,7 @@ bool SystemFactory::setAutoStartStatus(const AutoStartStatus &new_status) {
|
||||
// "rssguard.desktop" desktop file.
|
||||
switch (new_status) {
|
||||
case SystemFactory::Enabled:
|
||||
QFile::link(QString(APP_DESKTOP_ENTRY_PATH) + "/" + APP_DESKTOP_ENTRY_FILE,
|
||||
QFile::link(QString(APP_DESKTOP_ENTRY_PATH) + '/' + APP_DESKTOP_ENTRY_FILE,
|
||||
getAutostartDesktopFileLocation());
|
||||
return true;
|
||||
case SystemFactory::Disabled:
|
||||
|
@ -1,11 +1,12 @@
|
||||
#include "core/textfactory.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QLocale>
|
||||
#include <QRegExp>
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/textfactory.h"
|
||||
|
||||
|
||||
TextFactory::TextFactory() {
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
#ifndef TEXTFACTORY_H
|
||||
#define TEXTFACTORY_H
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
#include "core/defs.h"
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
|
||||
class TextFactory {
|
||||
private:
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include "gui/baselineedit.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
|
||||
|
||||
BaseLineEdit::BaseLineEdit(QWidget *parent) : QLineEdit(parent) {
|
||||
}
|
||||
|
@ -1,3 +1,11 @@
|
||||
#include "gui/basewebview.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/basewebpage.h"
|
||||
#include "gui/skinfactory.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
|
||||
#include <QStyleOptionFrameV3>
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
@ -7,13 +15,6 @@
|
||||
#include <QContextMenuEvent>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/basewebpage.h"
|
||||
#include "gui/basewebview.h"
|
||||
#include "gui/skinfactory.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
|
||||
|
||||
BaseWebView::BaseWebView(QWidget *parent)
|
||||
: QWebView(parent), m_page(new BaseWebPage(this)) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "gui/cornerbutton.h"
|
||||
|
||||
#include "gui/iconthemefactory.h"
|
||||
|
||||
|
||||
|
@ -1,14 +1,15 @@
|
||||
#include "gui/dynamicshortcutswidget.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "gui/shortcutcatcher.h"
|
||||
#include "gui/shortcutbutton.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QAction>
|
||||
#include <QLabel>
|
||||
#include <QSpacerItem>
|
||||
#include <QPalette>
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "gui/dynamicshortcutswidget.h"
|
||||
#include "gui/shortcutcatcher.h"
|
||||
#include "gui/shortcutbutton.h"
|
||||
|
||||
|
||||
DynamicShortcutsWidget::DynamicShortcutsWidget(QWidget *parent) : QWidget(parent) {
|
||||
// Create layout for this control and set is as active.
|
||||
@ -42,7 +43,7 @@ bool DynamicShortcutsWidget::areShortcutsUnique() {
|
||||
}
|
||||
|
||||
void DynamicShortcutsWidget::updateShortcuts() {
|
||||
foreach (ActionBinding binding, m_actionBindings) {
|
||||
foreach (const ActionBinding &binding, m_actionBindings) {
|
||||
binding.first->setShortcut(binding.second->shortcut());
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,13 @@
|
||||
#include "gui/feedmessageviewer.h"
|
||||
|
||||
#include "core/settings.h"
|
||||
#include "core/messagesproxymodel.h"
|
||||
#include "gui/webbrowser.h"
|
||||
#include "gui/formmain.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "gui/messagesview.h"
|
||||
#include "gui/feedsview.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QSplitter>
|
||||
#include <QToolBar>
|
||||
@ -8,15 +18,6 @@
|
||||
#include <QMenu>
|
||||
#include <QWidgetAction>
|
||||
|
||||
#include "gui/feedmessageviewer.h"
|
||||
#include "gui/webbrowser.h"
|
||||
#include "gui/formmain.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "gui/messagesview.h"
|
||||
#include "gui/feedsview.h"
|
||||
#include "core/messagesproxymodel.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
|
||||
FeedMessageViewer::FeedMessageViewer(QWidget *parent)
|
||||
: TabContent(parent),
|
||||
|
@ -1,11 +1,13 @@
|
||||
#include <QHeaderView>
|
||||
|
||||
#include "core/feedsmodelfeed.h"
|
||||
#include "gui/feedsview.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/feedsmodelfeed.h"
|
||||
#include "core/feedsmodel.h"
|
||||
#include "core/feedsproxymodel.h"
|
||||
#include "core/feedsmodelrootitem.h"
|
||||
#include "core/defs.h"
|
||||
|
||||
|
||||
#include <QHeaderView>
|
||||
|
||||
|
||||
FeedsView::FeedsView(QWidget *parent) : QTreeView(parent) {
|
||||
|
@ -1,10 +1,11 @@
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include "gui/formabout.h"
|
||||
|
||||
#include "core/textfactory.h"
|
||||
#include "gui/formabout.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
|
||||
FormAbout::FormAbout(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormAbout) {
|
||||
m_ui->setupUi(this);
|
||||
@ -83,5 +84,6 @@ FormAbout::FormAbout(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormAbout)
|
||||
}
|
||||
|
||||
FormAbout::~FormAbout() {
|
||||
qDebug("Destroying FormAbout instance.");
|
||||
delete m_ui;
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
#ifndef FORMABOUT_H
|
||||
#define FORMABOUT_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "ui_formabout.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class FormAbout;
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include <QCloseEvent>
|
||||
#include <QMessageBox>
|
||||
#include <QSessionManager>
|
||||
#include <QRect>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
#include "gui/formmain.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
#include "gui/formabout.h"
|
||||
#include "gui/formsettings.h"
|
||||
#include "gui/webbrowser.h"
|
||||
@ -12,11 +9,15 @@
|
||||
#include "gui/systemtrayicon.h"
|
||||
#include "gui/tabbar.h"
|
||||
#include "gui/statusbar.h"
|
||||
#include "core/settings.h"
|
||||
#include "gui/feedmessageviewer.h"
|
||||
#include "core/defs.h"
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
|
||||
#include <QCloseEvent>
|
||||
#include <QMessageBox>
|
||||
#include <QSessionManager>
|
||||
#include <QRect>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
|
||||
FormMain *FormMain::s_instance;
|
||||
|
||||
@ -314,12 +315,18 @@ void FormMain::closeEvent(QCloseEvent *event) {
|
||||
}
|
||||
|
||||
void FormMain::showAbout() {
|
||||
FormAbout(this).exec();
|
||||
QPointer<FormAbout> form_pointer = new FormAbout(this);
|
||||
form_pointer.data()->exec();
|
||||
delete form_pointer.data();
|
||||
}
|
||||
|
||||
void FormMain::showSettings() {
|
||||
if (FormSettings(this).exec() == QDialog::Accepted) {
|
||||
QPointer<FormSettings> form_pointer = new FormSettings(this);
|
||||
|
||||
if (form_pointer.data()->exec() == QDialog::Accepted) {
|
||||
// User applied new settings, reload neede components.
|
||||
m_ui->m_tabWidget->checkTabBarVisibility();
|
||||
}
|
||||
|
||||
delete form_pointer.data();
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
#ifndef FORMMAIN_H
|
||||
#define FORMMAIN_H
|
||||
|
||||
#include "ui_formmain.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QUrl>
|
||||
|
||||
#include "ui_formmain.h"
|
||||
|
||||
|
||||
class FormMain : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
@ -1,21 +1,22 @@
|
||||
#include <QMessageBox>
|
||||
#include <QProcess>
|
||||
#include <QNetworkProxy>
|
||||
#include <QColorDialog>
|
||||
#include <QFileDialog>
|
||||
|
||||
#include "gui/formsettings.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/localization.h"
|
||||
#include "core/systemfactory.h"
|
||||
#include "core/dynamicshortcuts.h"
|
||||
#include "core/webbrowsernetworkaccessmanager.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "gui/skinfactory.h"
|
||||
#include "gui/systemtrayicon.h"
|
||||
#include "gui/formmain.h"
|
||||
#include "gui/webbrowser.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/defs.h"
|
||||
#include "core/localization.h"
|
||||
#include "core/systemfactory.h"
|
||||
#include "core/dynamicshortcuts.h"
|
||||
#include "core/webbrowsernetworkaccessmanager.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QProcess>
|
||||
#include <QNetworkProxy>
|
||||
#include <QColorDialog>
|
||||
#include <QFileDialog>
|
||||
|
||||
|
||||
FormSettings::FormSettings(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormSettings) {
|
||||
@ -78,7 +79,7 @@ FormSettings::FormSettings(QWidget *parent) : QDialog(parent), m_ui(new Ui::Form
|
||||
this, SLOT(onProxyTypeChanged(int)));
|
||||
connect(m_ui->m_checkShowPassword, SIGNAL(stateChanged(int)),
|
||||
this, SLOT(displayProxyPassword(int)));
|
||||
connect(m_ui->m_btnBrowserProgressColor, SIGNAL(clicked()),
|
||||
connect(m_ui->m_btnWebBrowserColorSample, SIGNAL(clicked()),
|
||||
this, SLOT(changeBrowserProgressColor()));
|
||||
connect(m_ui->m_treeSkins, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
|
||||
this, SLOT(onSkinSelected(QTreeWidgetItem*,QTreeWidgetItem*)));
|
||||
@ -98,6 +99,7 @@ FormSettings::FormSettings(QWidget *parent) : QDialog(parent), m_ui(new Ui::Form
|
||||
}
|
||||
|
||||
FormSettings::~FormSettings() {
|
||||
qDebug("Destroying FormSettings distance.");
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
@ -118,14 +120,17 @@ void FormSettings::onSkinSelected(QTreeWidgetItem *current,
|
||||
}
|
||||
|
||||
void FormSettings::changeBrowserProgressColor() {
|
||||
QColorDialog color_dialog(m_initialSettings.m_webBrowserProgress, this);
|
||||
color_dialog.setWindowTitle(tr("Select color for web browser progress bar"));
|
||||
color_dialog.setOption(QColorDialog::ShowAlphaChannel);
|
||||
QPointer<QColorDialog> color_dialog = new QColorDialog(m_initialSettings.m_webBrowserProgress,
|
||||
this);
|
||||
color_dialog.data()->setWindowTitle(tr("Select color for web browser progress bar"));
|
||||
color_dialog.data()->setOption(QColorDialog::ShowAlphaChannel);
|
||||
|
||||
if (color_dialog.exec() == QDialog::Accepted) {
|
||||
m_initialSettings.m_webBrowserProgress = color_dialog.selectedColor();
|
||||
if (color_dialog.data()->exec() == QDialog::Accepted) {
|
||||
m_initialSettings.m_webBrowserProgress = color_dialog.data()->selectedColor();
|
||||
loadWebBrowserColor(m_initialSettings.m_webBrowserProgress);
|
||||
}
|
||||
|
||||
delete color_dialog.data();
|
||||
}
|
||||
|
||||
void FormSettings::selectBrowserExecutable() {
|
||||
@ -191,14 +196,16 @@ bool FormSettings::doSaveCheck() {
|
||||
QString::fromUtf8(" • "));
|
||||
|
||||
// Some critical errors occurred, display warnings.
|
||||
QMessageBox msg_error(this);
|
||||
msg_error.setText(tr("Some critical settings are not set. You must fix these settings in order confirm new settings."));
|
||||
msg_error.setWindowTitle(tr("Cannot save settings"));
|
||||
msg_error.setDetailedText(tr("List of errors:\n%1.").arg(resulting_information.join(",\n")));
|
||||
msg_error.setIcon(QMessageBox::Critical);
|
||||
msg_error.setStandardButtons(QMessageBox::Ok);
|
||||
msg_error.setDefaultButton(QMessageBox::Ok);
|
||||
msg_error.exec();
|
||||
QPointer<QMessageBox> msg_error = new QMessageBox(this);
|
||||
msg_error.data()->setText(tr("Some critical settings are not set. You must fix these settings in order confirm new settings."));
|
||||
msg_error.data()->setWindowTitle(tr("Cannot save settings"));
|
||||
msg_error.data()->setDetailedText(tr("List of errors:\n%1.").arg(resulting_information.join(",\n")));
|
||||
msg_error.data()->setIcon(QMessageBox::Critical);
|
||||
msg_error.data()->setStandardButtons(QMessageBox::Ok);
|
||||
msg_error.data()->setDefaultButton(QMessageBox::Ok);
|
||||
msg_error.data()->exec();
|
||||
|
||||
delete msg_error.data();
|
||||
}
|
||||
|
||||
return everything_ok;
|
||||
@ -218,16 +225,20 @@ void FormSettings::promptForRestart() {
|
||||
changed_data_texts.replaceInStrings(QRegExp("^"),
|
||||
QString::fromUtf8(" • "));
|
||||
|
||||
QMessageBox msg_question(this);
|
||||
msg_question.setText(tr("Some critical settings were changed and will be applied after the application gets restarted."));
|
||||
msg_question.setInformativeText(tr("Do you want to restart now?"));
|
||||
msg_question.setWindowTitle(tr("Critical settings were changed"));
|
||||
msg_question.setDetailedText(tr("List of changes:\n%1.").arg(changed_data_texts.join(",\n")));
|
||||
msg_question.setIcon(QMessageBox::Question);
|
||||
msg_question.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
|
||||
msg_question.setDefaultButton(QMessageBox::Yes);
|
||||
QPointer<QMessageBox> msg_question = new QMessageBox(this);
|
||||
msg_question.data()->setText(tr("Some critical settings were changed and will be applied after the application gets restarted."));
|
||||
msg_question.data()->setInformativeText(tr("Do you want to restart now?"));
|
||||
msg_question.data()->setWindowTitle(tr("Critical settings were changed"));
|
||||
msg_question.data()->setDetailedText(tr("List of changes:\n%1.").arg(changed_data_texts.join(",\n")));
|
||||
msg_question.data()->setIcon(QMessageBox::Question);
|
||||
msg_question.data()->setStandardButtons(QMessageBox::Yes | QMessageBox::No);
|
||||
msg_question.data()->setDefaultButton(QMessageBox::Yes);
|
||||
|
||||
if (msg_question.exec() == QMessageBox::Yes) {
|
||||
int question_result = msg_question.data()->exec();
|
||||
|
||||
delete msg_question.data();
|
||||
|
||||
if (question_result == QMessageBox::Yes) {
|
||||
if (!QProcess::startDetached(qApp->applicationFilePath())) {
|
||||
QMessageBox::warning(this,
|
||||
tr("Problem with application restart"),
|
||||
@ -364,7 +375,7 @@ void FormSettings::loadLanguage() {
|
||||
item->setText(2, language.m_version);
|
||||
item->setText(3, language.m_author);
|
||||
item->setText(4, language.m_email);
|
||||
item->setIcon(0, QIcon(APP_FLAGS_PATH + "/" + language.m_code + ".png"));
|
||||
item->setIcon(0, QIcon(APP_FLAGS_PATH + '/' + language.m_code + ".png"));
|
||||
}
|
||||
|
||||
QList<QTreeWidgetItem*> matching_items = m_ui->m_treeLanguages->findItems(Settings::getInstance()->value(APP_CFG_GEN,
|
||||
|
@ -1,10 +1,10 @@
|
||||
#ifndef FORMSETTINGS_H
|
||||
#define FORMSETTINGS_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "ui_formsettings.h"
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class FormSettings;
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>803</width>
|
||||
<width>808</width>
|
||||
<height>410</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -69,8 +69,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>559</width>
|
||||
<height>363</height>
|
||||
<width>100</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
@ -147,8 +147,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>553</width>
|
||||
<height>337</height>
|
||||
<width>195</width>
|
||||
<height>238</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
@ -436,28 +436,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_btnBrowserProgressColor">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Change...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Current color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="m_btnWebBrowserColorSample">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@ -936,22 +922,6 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_checkBrowserProgressColor</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>m_btnBrowserProgressColor</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>300</x>
|
||||
<y>48</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>577</x>
|
||||
<y>63</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>m_checkBrowserProgressColor</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
|
@ -1,10 +1,11 @@
|
||||
#include "gui/formwelcome.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
#include "gui/formwelcome.h"
|
||||
#include "core/defs.h"
|
||||
|
||||
|
||||
FormWelcome::FormWelcome(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormWelcome) {
|
||||
m_ui->setupUi(this);
|
||||
|
@ -1,10 +1,10 @@
|
||||
#ifndef FORMWELCOME_H
|
||||
#define FORMWELCOME_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "ui_formwelcome.h"
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class FormWelcome;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <QBuffer>
|
||||
|
||||
#include "gui/iconfactory.h"
|
||||
|
||||
#include <QBuffer>
|
||||
|
||||
|
||||
IconFactory::IconFactory() {
|
||||
}
|
||||
|
@ -6,12 +6,12 @@
|
||||
|
||||
class IconFactory {
|
||||
private:
|
||||
IconFactory();
|
||||
explicit IconFactory();
|
||||
|
||||
public:
|
||||
// Used to store/retrieve QIcons from/to database.
|
||||
static QIcon fromByteArray(QByteArray array);
|
||||
static QByteArray toByteArray(const QIcon &icon);
|
||||
|
||||
};
|
||||
|
||||
#endif // ICONFACTORY_H
|
||||
|
@ -1,3 +1,9 @@
|
||||
#include "gui/iconthemefactory.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
@ -5,11 +11,6 @@
|
||||
#include <QApplication>
|
||||
#include <QHash>
|
||||
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/defs.h"
|
||||
|
||||
|
||||
QPointer<IconThemeFactory> IconThemeFactory::s_instance;
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
#include "gui/locationlineedit.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
#include <QPaintEvent>
|
||||
#include <QStyleOptionFrameV2>
|
||||
#include <QPainter>
|
||||
#include <QApplication>
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
#include "gui/locationlineedit.h"
|
||||
|
||||
|
||||
LocationLineEdit::LocationLineEdit(QWidget *parent)
|
||||
: BaseLineEdit(parent),
|
||||
|
@ -1,3 +1,10 @@
|
||||
#include "gui/messagesview.h"
|
||||
|
||||
#include "core/messagesproxymodel.h"
|
||||
#include "core/messagesmodel.h"
|
||||
#include "core/settings.h"
|
||||
#include "gui/formmain.h"
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QKeyEvent>
|
||||
#include <QScrollBar>
|
||||
@ -5,12 +12,6 @@
|
||||
#include <QMessageBox>
|
||||
#include <QProcess>
|
||||
|
||||
#include "gui/messagesview.h"
|
||||
#include "gui/formmain.h"
|
||||
#include "core/messagesproxymodel.h"
|
||||
#include "core/messagesmodel.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
|
||||
MessagesView::MessagesView(QWidget *parent)
|
||||
: QTreeView(parent), m_contextMenu(NULL), m_batchUnreadSwitch(false) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
#ifndef MESSAGESVIEW_H
|
||||
#define MESSAGESVIEW_H
|
||||
|
||||
#include <QTreeView>
|
||||
|
||||
#include "core/messagesmodel.h"
|
||||
|
||||
#include <QTreeView>
|
||||
|
||||
|
||||
class MessagesProxyModel;
|
||||
|
||||
|
@ -26,11 +26,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*******************************************************************************/
|
||||
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include "gui/shortcutbutton.h"
|
||||
|
||||
#include "gui/shortcutcatcher.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
|
||||
|
||||
ShortcutButton::ShortcutButton(ShortcutCatcher *catcher, QWidget *parent)
|
||||
: QPushButton(parent), m_catcher(catcher) {
|
||||
|
@ -26,13 +26,14 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*******************************************************************************/
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QToolButton>
|
||||
|
||||
#include "gui/shortcutcatcher.h"
|
||||
|
||||
#include "gui/shortcutbutton.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QToolButton>
|
||||
|
||||
|
||||
ShortcutCatcher::ShortcutCatcher(QWidget *parent)
|
||||
: QWidget(parent) {
|
||||
|
@ -1,13 +1,14 @@
|
||||
#include "gui/skinfactory.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDomDocument>
|
||||
#include <QDir>
|
||||
#include <QXmlQuery>
|
||||
#include <QStyleFactory>
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
#include "gui/skinfactory.h"
|
||||
|
||||
|
||||
QPointer<SkinFactory> SkinFactory::s_instance;
|
||||
|
||||
@ -72,7 +73,7 @@ bool SkinFactory::loadSkinFromData(const Skin &skin) {
|
||||
|
||||
if (!raw_data.isEmpty()) {
|
||||
QString parsed_data = raw_data.replace("##",
|
||||
APP_SKIN_PATH + "/" +
|
||||
APP_SKIN_PATH + '/' +
|
||||
skin_folder + "/images");
|
||||
qApp->setStyleSheet(parsed_data);
|
||||
}
|
||||
@ -119,7 +120,7 @@ Skin SkinFactory::getSkinInfo(const QString &skin_name, bool *ok) {
|
||||
// Obtain visible skin name.
|
||||
query.setQuery("string(skin/name)");
|
||||
query.evaluateTo(&skin.m_visibleName);
|
||||
skin.m_visibleName = skin.m_visibleName.remove("\n");
|
||||
skin.m_visibleName = skin.m_visibleName.remove('\n');
|
||||
|
||||
// Obtain skin raw data.
|
||||
query.setQuery("string(skin/data)");
|
||||
@ -129,22 +130,22 @@ Skin SkinFactory::getSkinInfo(const QString &skin_name, bool *ok) {
|
||||
// Obtain style name.
|
||||
query.setQuery("string(/skin/style)");
|
||||
query.evaluateTo(&styles);
|
||||
skin.m_stylesNames = styles.remove("\n").split(",", QString::SkipEmptyParts);
|
||||
skin.m_stylesNames = styles.remove('\n').split(",", QString::SkipEmptyParts);
|
||||
|
||||
// Obtain author.
|
||||
query.setQuery("string(/skin/author/name)");
|
||||
query.evaluateTo(&skin.m_author);
|
||||
skin.m_author = skin.m_author.remove("\n");
|
||||
skin.m_author = skin.m_author.remove('\n');
|
||||
|
||||
// Obtain email.
|
||||
query.setQuery("string(/skin/author/email)");
|
||||
query.evaluateTo(&skin.m_email);
|
||||
skin.m_email = skin.m_email.remove("\n");
|
||||
skin.m_email = skin.m_email.remove('\n');
|
||||
|
||||
// Obtain version.
|
||||
query.setQuery("string(/skin/@version)");
|
||||
query.evaluateTo(&skin.m_version);
|
||||
skin.m_version = skin.m_version.remove("\n");
|
||||
skin.m_version = skin.m_version.remove('\n');
|
||||
|
||||
// Obtain layout markup.
|
||||
query.setQuery("string(/skin/markup)");
|
||||
|
@ -1,14 +1,15 @@
|
||||
#include "gui/systemtrayicon.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
#include "gui/formmain.h"
|
||||
#include "gui/formsettings.h"
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QTimer>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "gui/systemtrayicon.h"
|
||||
#include "gui/formmain.h"
|
||||
#include "gui/formsettings.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/defs.h"
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
TrayIconMenu::TrayIconMenu(const QString &title, QWidget *parent)
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include <QMouseEvent>
|
||||
#include "gui/tabbar.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
#include "gui/tabbar.h"
|
||||
|
||||
#include <QMouseEvent>
|
||||
|
||||
|
||||
TabBar::TabBar(QWidget *parent) : QTabBar(parent) {
|
||||
|
@ -1,16 +1,17 @@
|
||||
#include <QUrl>
|
||||
#include <QApplication>
|
||||
#include "gui/tabwidget.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/textfactory.h"
|
||||
#include "gui/tabwidget.h"
|
||||
#include "gui/tabbar.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "gui/webbrowser.h"
|
||||
#include "gui/feedmessageviewer.h"
|
||||
#include "gui/cornerbutton.h"
|
||||
|
||||
#include <QUrl>
|
||||
#include <QApplication>
|
||||
|
||||
|
||||
TabWidget::TabWidget(QWidget *parent) : QTabWidget(parent) {
|
||||
setTabBar(new TabBar(this));
|
||||
|
@ -1,12 +1,12 @@
|
||||
#ifndef TABWIDGET_H
|
||||
#define TABWIDGET_H
|
||||
|
||||
#include <QTabWidget>
|
||||
#include <QUrl>
|
||||
|
||||
#include "gui/tabbar.h"
|
||||
#include "gui/tabcontent.h"
|
||||
|
||||
#include <QTabWidget>
|
||||
#include <QUrl>
|
||||
|
||||
|
||||
class CornerButton;
|
||||
class Message;
|
||||
|
@ -1,3 +1,16 @@
|
||||
#include "gui/webbrowser.h"
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/basenetworkaccessmanager.h"
|
||||
#include "core/webbrowsernetworkaccessmanager.h"
|
||||
#include "core/basewebpage.h"
|
||||
#include "gui/skinfactory.h"
|
||||
#include "gui/basewebview.h"
|
||||
#include "gui/formmain.h"
|
||||
#include "gui/locationlineedit.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "gui/tabwidget.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QToolBar>
|
||||
#include <QAction>
|
||||
@ -6,23 +19,10 @@
|
||||
#include <QWebFrame>
|
||||
#include <QWidgetAction>
|
||||
#include <QSlider>
|
||||
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
#include <QToolButton>
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/basenetworkaccessmanager.h"
|
||||
#include "core/webbrowsernetworkaccessmanager.h"
|
||||
#include "core/basewebpage.h"
|
||||
#include "gui/skinfactory.h"
|
||||
#include "gui/basewebview.h"
|
||||
#include "gui/webbrowser.h"
|
||||
#include "gui/formmain.h"
|
||||
#include "gui/locationlineedit.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "gui/tabwidget.h"
|
||||
|
||||
|
||||
QPointer<WebBrowserNetworkAccessManager> WebBrowser::m_networkManager;
|
||||
QList<WebBrowser*> WebBrowser::m_runningWebBrowsers;
|
||||
|
15
src/main.cpp
15
src/main.cpp
@ -1,12 +1,5 @@
|
||||
// Needed for setting ini file format on Mac OS.
|
||||
#ifdef Q_OS_MAC
|
||||
#include <QSettings>
|
||||
#endif
|
||||
|
||||
#include <QTranslator>
|
||||
|
||||
#include "core/databasefactory.h"
|
||||
#include "core/defs.h"
|
||||
#include "core/databasefactory.h"
|
||||
#include "core/debugging.h"
|
||||
#include "core/localization.h"
|
||||
#include "core/settings.h"
|
||||
@ -18,6 +11,12 @@
|
||||
#include "gui/systemtrayicon.h"
|
||||
#include "qtsingleapplication/qtsingleapplication.h"
|
||||
|
||||
// Needed for setting ini file format on Mac OS.
|
||||
#ifdef Q_OS_MAC
|
||||
#include <QSettings>
|
||||
#endif
|
||||
|
||||
#include <QTranslator>
|
||||
|
||||
|
||||
// TODO: Check if extra UNIX signalling is needed.
|
||||
|
@ -52,7 +52,7 @@ class QtLocalPeer : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QtLocalPeer(QObject *parent = 0, const QString &appId = QString());
|
||||
explicit QtLocalPeer(QObject *parent = 0, const QString &appId = QString());
|
||||
bool isClient();
|
||||
bool sendMessage(const QString &message, int timeout);
|
||||
QString applicationId() const
|
||||
|
@ -69,8 +69,8 @@ class QT_QTLOCKEDFILE_EXPORT QtLockedFile : public QFile
|
||||
public:
|
||||
enum LockMode { NoLock = 0, ReadLock, WriteLock };
|
||||
|
||||
QtLockedFile();
|
||||
QtLockedFile(const QString &name);
|
||||
explicit QtLockedFile();
|
||||
explicit QtLockedFile(const QString &name);
|
||||
~QtLockedFile();
|
||||
|
||||
bool open(OpenMode mode);
|
||||
|
@ -66,14 +66,14 @@ class QT_QTSINGLEAPPLICATION_EXPORT QtSingleApplication : public QApplication
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QtSingleApplication(int &argc, char **argv, bool GUIenabled = true);
|
||||
QtSingleApplication(const QString &id, int &argc, char **argv);
|
||||
explicit QtSingleApplication(int &argc, char **argv, bool GUIenabled = true);
|
||||
explicit QtSingleApplication(const QString &id, int &argc, char **argv);
|
||||
#if QT_VERSION < 0x050000
|
||||
QtSingleApplication(int &argc, char **argv, Type type);
|
||||
explicit QtSingleApplication(int &argc, char **argv, Type type);
|
||||
# if defined(Q_WS_X11)
|
||||
QtSingleApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
|
||||
QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0);
|
||||
QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
|
||||
explicit QtSingleApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
|
||||
explicit QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0);
|
||||
explicit QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
|
||||
# endif // Q_WS_X11
|
||||
#endif // QT_VERSION < 0x050000
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user