Some changes.

This commit is contained in:
Martin Rotter 2014-02-16 18:43:33 +01:00
parent 43c6540943
commit 55c645a824
6 changed files with 11 additions and 5 deletions

View File

@ -70,6 +70,7 @@
#define APP_CFG_BROWSER "browser" #define APP_CFG_BROWSER "browser"
#define APP_CFG_MESSAGES "messages" #define APP_CFG_MESSAGES "messages"
#define APP_CFG_FEEDS "feeds" #define APP_CFG_FEEDS "feeds"
#define APP_CFG_CAT_EXT "expanded_categories"
#ifdef Q_OS_OSX #ifdef Q_OS_OSX
#define APP_PREFIX "@CMAKE_INSTALL_PREFIX@/@APP_LOW_NAME@.app/Contents/Resources" #define APP_PREFIX "@CMAKE_INSTALL_PREFIX@/@APP_LOW_NAME@.app/Contents/Resources"

View File

@ -38,6 +38,10 @@ FeedsModel::~FeedsModel() {
delete m_rootItem; delete m_rootItem;
} }
QModelIndexList FeedsModel::persistentIndexList() const {
return QAbstractItemModel::persistentIndexList();
}
QVariant FeedsModel::headerData(int section, QVariant FeedsModel::headerData(int section,
Qt::Orientation orientation, Qt::Orientation orientation,
int role) const { int role) const {

View File

@ -27,6 +27,10 @@ class FeedsModel : public QAbstractItemModel {
explicit FeedsModel(QObject *parent = 0); explicit FeedsModel(QObject *parent = 0);
virtual ~FeedsModel(); virtual ~FeedsModel();
// Returns list of all indexes available
// in the model.
QModelIndexList persistentIndexList() const;
// Model implementation. // Model implementation.
inline QVariant data(const QModelIndex &index, int role) const { inline QVariant data(const QModelIndex &index, int role) const {
return itemForIndex(index)->data(index.column(), role); return itemForIndex(index)->data(index.column(), role);

View File

@ -136,7 +136,6 @@ void FormMain::processExecutionMessage(const QString &message) {
void FormMain::quit() { void FormMain::quit() {
qDebug("Quitting the application."); qDebug("Quitting the application.");
qApp->quit(); qApp->quit();
} }
@ -387,8 +386,6 @@ void FormMain::showAbout() {
void FormMain::showSettings() { void FormMain::showSettings() {
QPointer<FormSettings> form_pointer = new FormSettings(this); QPointer<FormSettings> form_pointer = new FormSettings(this);
form_pointer.data()->exec(); form_pointer.data()->exec();
delete form_pointer.data(); delete form_pointer.data();
} }

View File

@ -303,7 +303,7 @@ void FormSettings::loadBrowser() {
// Load settings of web browser GUI. // Load settings of web browser GUI.
m_initialSettings.m_webBrowserProgress = QColor(settings->value(APP_CFG_BROWSER, m_initialSettings.m_webBrowserProgress = QColor(settings->value(APP_CFG_BROWSER,
"browser_progress_color", "browser_progress_color",
QColor(59, 94, 248)).toString()); QColor(155, 250, 80)).toString());
m_ui->m_checkBrowserProgressColor->setChecked(settings->value(APP_CFG_BROWSER, m_ui->m_checkBrowserProgressColor->setChecked(settings->value(APP_CFG_BROWSER,
"browser_colored_progress_enabled", "browser_colored_progress_enabled",
true).toBool()); true).toBool());

View File

@ -60,7 +60,7 @@ void LocationLineEdit::paintEvent(QPaintEvent *event) {
QPalette current_palette = palette(); QPalette current_palette = palette();
QColor loadingColor = QColor(settings->value(APP_CFG_BROWSER, QColor loadingColor = QColor(settings->value(APP_CFG_BROWSER,
"browser_progress_color", "browser_progress_color",
QColor(59, 94, 248)).toString()); QColor(155, 250, 80)).toString());
QLinearGradient gradient(0, 0, width(), 0); QLinearGradient gradient(0, 0, width(), 0);
qreal percentage_border = m_progress / 100.0; qreal percentage_border = m_progress / 100.0;