Version increased, many cleanups.
This commit is contained in:
parent
9de551794c
commit
4efdcd6262
17 changed files with 54 additions and 83 deletions
|
@ -40,8 +40,8 @@
|
|||
project(rssguard)
|
||||
set(APP_NAME "RSS Guard")
|
||||
set(APP_LOW_NAME "rssguard")
|
||||
set(APP_VERSION "1.9.9.2")
|
||||
set(FILE_VERSION "1,9,9,2")
|
||||
set(APP_VERSION "1.9.9.3")
|
||||
set(FILE_VERSION "1,9,9,3")
|
||||
set(APP_AUTHOR "Martin Rotter")
|
||||
set(APP_URL "http://www.rssguard.comehere.cz")
|
||||
set(APP_URL_ISSUES "http://github.com/martinrotter/rssguard/issues")
|
||||
|
|
|
@ -64,7 +64,7 @@ class DatabaseFactory : public QObject {
|
|||
bool m_inMemoryInitialized;
|
||||
|
||||
// Is true when user selected in-memory database.
|
||||
// NOTE: This is set only on application startup.
|
||||
// NOTE: This can be changed only on application startup.
|
||||
bool m_inMemoryEnabled;
|
||||
|
||||
// Private singleton value.
|
||||
|
|
|
@ -563,10 +563,6 @@ QStringList FeedsModel::textualFeedIds(const QList<FeedsModelFeed*> &feeds) {
|
|||
}
|
||||
|
||||
void FeedsModel::reloadWholeLayout() {
|
||||
// NOTE: Take a look at docs about this.
|
||||
// I have tested that this is LITTLE slower than code above,
|
||||
// but it is really SIMPLER, so if code above will be buggy, then
|
||||
// we can use this.
|
||||
emit layoutAboutToBeChanged();
|
||||
emit layoutChanged();
|
||||
}
|
||||
|
@ -607,7 +603,6 @@ void FeedsModel::loadFromDatabase() {
|
|||
|
||||
case FeedsModelCategory::Feedly:
|
||||
default:
|
||||
// NOTE: Not yet implemented.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,8 +91,6 @@ class FeedsModel : public QAbstractItemModel {
|
|||
// Returns list of feeds which belong to given indexes.
|
||||
// NOTE: If index is "category", then all child feeds are contained in the
|
||||
// result.
|
||||
// NOTE: This is particularly useful for displaying messages of
|
||||
// selected feeds.
|
||||
QList<FeedsModelFeed*> feedsForIndexes(const QModelIndexList &indexes);
|
||||
|
||||
// Returns ALL CHILD feeds contained within single index.
|
||||
|
|
|
@ -13,9 +13,9 @@ class FeedsModelFeed : public FeedsModelRootItem {
|
|||
// Describes possible types of feeds.
|
||||
// NOTE: This is equivalent to attribute Feeds(type).
|
||||
enum Type {
|
||||
StandardRss0X = 0,
|
||||
StandardRss2X = 1,
|
||||
StandardRdf = 2,
|
||||
StandardRss0X = 0,
|
||||
StandardRss2X = 1,
|
||||
StandardRdf = 2,
|
||||
StandardAtom10 = 3
|
||||
};
|
||||
|
||||
|
|
|
@ -123,7 +123,6 @@ class FeedsModelRootItem {
|
|||
}
|
||||
|
||||
// Each item has its title.
|
||||
// NOTE: This is note entirely true for the root item.
|
||||
inline QString title() const {
|
||||
return m_title;
|
||||
}
|
||||
|
|
|
@ -89,9 +89,6 @@ class FeedsModelStandardFeed : public FeedsModelFeed {
|
|||
|
||||
private:
|
||||
AutoUpdateType m_autoUpdateType;
|
||||
// NOTE: Number -1 means "do not auto-update", number
|
||||
// 0 means "auto-update with global interval" and number
|
||||
// > 0 means "auto-update with specific interval".
|
||||
int m_autoUpdateInitialInterval;
|
||||
int m_autoUpdateRemainingInterval;
|
||||
|
||||
|
|
|
@ -72,8 +72,6 @@ class MessagesModel : public QSqlTableModel {
|
|||
bool setBatchMessagesRead(const QModelIndexList &messages, int read);
|
||||
|
||||
// Fetches ALL available data to the model.
|
||||
// NOTE: This is almost always needed when sorting
|
||||
// and makes the model more predictable.
|
||||
void fetchAll();
|
||||
|
||||
// Loads messages of given feeds.
|
||||
|
|
|
@ -200,7 +200,7 @@ void FeedMessageViewer::createConnections() {
|
|||
SIGNAL(triggered()), m_feedsView, SLOT(markSelectedFeedsRead()));
|
||||
connect(form_main->m_ui->m_actionMarkSelectedFeedsAsUnread,
|
||||
SIGNAL(triggered()), m_feedsView, SLOT(markSelectedFeedsUnread()));
|
||||
connect(form_main->m_ui->m_actionClearFeeds,
|
||||
connect(form_main->m_ui->m_actionClearSelectedFeeds,
|
||||
SIGNAL(triggered()), m_feedsView, SLOT(clearSelectedFeeds()));
|
||||
connect(form_main->m_ui->m_actionUpdateSelectedFeedsCategories,
|
||||
SIGNAL(triggered()), m_feedsView, SLOT(updateSelectedFeeds()));
|
||||
|
@ -235,7 +235,7 @@ void FeedMessageViewer::initialize() {
|
|||
m_toolBar->addSeparator();
|
||||
m_toolBar->addAction(FormMain::instance()->m_ui->m_actionMarkSelectedFeedsAsRead);
|
||||
m_toolBar->addAction(FormMain::instance()->m_ui->m_actionMarkSelectedFeedsAsUnread);
|
||||
m_toolBar->addAction(FormMain::instance()->m_ui->m_actionClearFeeds);
|
||||
m_toolBar->addAction(FormMain::instance()->m_ui->m_actionClearSelectedFeeds);
|
||||
|
||||
// Finish web/message browser setup.
|
||||
m_messagesBrowser->setNavigationBarVisible(false);
|
||||
|
|
|
@ -62,7 +62,7 @@ QList<QAction*> FormMain::allActions() {
|
|||
// Add basic actions.
|
||||
actions << m_ui->m_actionImport << m_ui->m_actionExport <<
|
||||
m_ui->m_actionSettings << m_ui->m_actionQuit <<
|
||||
m_ui->m_actionFullscreen;
|
||||
m_ui->m_actionFullscreen << m_ui->m_actionAboutGuard;
|
||||
|
||||
// Add web browser actions
|
||||
actions << m_ui->m_actionAddBrowser << m_ui->m_actionCloseCurrentTab <<
|
||||
|
@ -72,9 +72,10 @@ QList<QAction*> FormMain::allActions() {
|
|||
actions << m_ui->m_actionOpenSelectedSourceArticlesExternally <<
|
||||
m_ui->m_actionOpenSelectedSourceArticlesInternally <<
|
||||
m_ui->m_actionOpenSelectedMessagesInternally <<
|
||||
m_ui->m_actionMarkAllFeedsRead <<
|
||||
m_ui->m_actionMarkSelectedFeedsAsRead <<
|
||||
m_ui->m_actionMarkSelectedFeedsAsUnread <<
|
||||
m_ui->m_actionClearFeeds <<
|
||||
m_ui->m_actionClearSelectedFeeds <<
|
||||
m_ui->m_actionMarkSelectedMessagesAsRead <<
|
||||
m_ui->m_actionMarkSelectedMessagesAsUnread <<
|
||||
m_ui->m_actionSwitchImportanceOfSelectedMessages <<
|
||||
|
@ -82,7 +83,10 @@ QList<QAction*> FormMain::allActions() {
|
|||
m_ui->m_actionUpdateAllFeeds <<
|
||||
m_ui->m_actionUpdateSelectedFeedsCategories <<
|
||||
m_ui->m_actionEditSelectedFeedCategory <<
|
||||
m_ui->m_actionDeleteSelectedFeedCategory;
|
||||
m_ui->m_actionDeleteSelectedFeedCategory <<
|
||||
m_ui->m_actionViewSelectedItemsNewspaperMode <<
|
||||
m_ui->m_actionAddStandardCategory <<
|
||||
m_ui->m_actionAddStandardFeed;
|
||||
|
||||
return actions;
|
||||
}
|
||||
|
@ -228,7 +232,7 @@ void FormMain::setupIcons() {
|
|||
m_ui->m_menuAddItem->setIcon(icon_theme_factory->fromTheme("item-new"));
|
||||
m_ui->m_actionUpdateAllFeeds->setIcon(icon_theme_factory->fromTheme("item-update-all"));
|
||||
m_ui->m_actionUpdateSelectedFeedsCategories->setIcon(icon_theme_factory->fromTheme("item-update-selected"));
|
||||
m_ui->m_actionClearFeeds->setIcon(icon_theme_factory->fromTheme("mail-remove"));
|
||||
m_ui->m_actionClearSelectedFeeds->setIcon(icon_theme_factory->fromTheme("mail-remove"));
|
||||
m_ui->m_actionDeleteSelectedFeedCategory->setIcon(icon_theme_factory->fromTheme("item-remove"));
|
||||
m_ui->m_actionDeleteSelectedMessages->setIcon(icon_theme_factory->fromTheme("mail-remove"));
|
||||
m_ui->m_actionAddStandardCategory->setIcon(icon_theme_factory->fromTheme("item-new"));
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<addaction name="m_actionMarkAllFeedsRead"/>
|
||||
<addaction name="m_actionMarkSelectedFeedsAsRead"/>
|
||||
<addaction name="m_actionMarkSelectedFeedsAsUnread"/>
|
||||
<addaction name="m_actionClearFeeds"/>
|
||||
<addaction name="m_actionClearSelectedFeeds"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="m_menuMessages">
|
||||
<property name="title">
|
||||
|
@ -346,27 +346,21 @@
|
|||
<string notr="true"/>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionClearFeeds">
|
||||
<action name="m_actionClearSelectedFeeds">
|
||||
<property name="text">
|
||||
<string>Clear selected items</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Remove all messages from selected feeds.</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionAddStandardFeed">
|
||||
<property name="text">
|
||||
<string>Standard &feed</string>
|
||||
<string>New standard &feed</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add new standard feed.</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionOpenSelectedSourceArticlesExternally">
|
||||
<property name="text">
|
||||
|
@ -403,14 +397,11 @@
|
|||
</action>
|
||||
<action name="m_actionAddStandardCategory">
|
||||
<property name="text">
|
||||
<string>Standard &category</string>
|
||||
<string>New standard &category</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add new standard category.</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionNoActions">
|
||||
<property name="text">
|
||||
|
|
|
@ -102,8 +102,8 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>100</width>
|
||||
<height>30</height>
|
||||
<width>564</width>
|
||||
<height>363</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
|
@ -180,8 +180,8 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>167</width>
|
||||
<height>219</height>
|
||||
<width>558</width>
|
||||
<height>337</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
|
@ -334,29 +334,6 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="m_grbCloseTabs">
|
||||
<property name="title">
|
||||
<string>Close tabs with</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="m_checkCloseTabsDoubleClick">
|
||||
<property name="text">
|
||||
<string>Left mouse button double-click</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="m_checkCloseTabsMiddleClick">
|
||||
<property name="text">
|
||||
<string>Middle mouse button single-click</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="m_checkNewTabDoubleClick">
|
||||
<property name="text">
|
||||
|
@ -371,6 +348,29 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="m_grbCloseTabs">
|
||||
<property name="title">
|
||||
<string>Close tabs with</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_13">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="m_checkCloseTabsDoubleClick">
|
||||
<property name="text">
|
||||
<string>Right mouse button double-click</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="m_checkCloseTabsMiddleClick">
|
||||
<property name="text">
|
||||
<string>Middle mouse button single-click</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
|
@ -51,7 +51,6 @@ void MessagesView::reloadSelections(int mark_current_index_read) {
|
|||
QModelIndex mapped_current_index = m_proxyModel->mapToSource(current_index);
|
||||
QModelIndexList selected_indexes = selectionModel()->selectedRows();
|
||||
QModelIndexList mapped_indexes = m_proxyModel->mapListToSource(selected_indexes);
|
||||
int row_count;
|
||||
|
||||
// Reload the model now.
|
||||
m_sourceModel->select();
|
||||
|
|
|
@ -41,9 +41,8 @@ void SkinFactory::loadCurrentSkin() {
|
|||
qDebug("Skin '%s' loaded.", qPrintable(skin_name_from_settings));
|
||||
}
|
||||
else {
|
||||
// TODO: Change this to qFatal once code is stable.
|
||||
qWarning("Skin '%s' not loaded because its data are corrupted. No skin is loaded now!",
|
||||
qPrintable(skin_name_from_settings));
|
||||
qFatal("Skin '%s' not loaded because its data are corrupted. No skin is loaded now!",
|
||||
qPrintable(skin_name_from_settings));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,8 +97,8 @@ void SkinFactory::setCurrentSkinName(const QString &skin_name) {
|
|||
|
||||
QString SkinFactory::selectedSkinName() {
|
||||
return Settings::instance()->value(APP_CFG_GUI,
|
||||
"skin",
|
||||
APP_SKIN_DEFAULT).toString();
|
||||
"skin",
|
||||
APP_SKIN_DEFAULT).toString();
|
||||
}
|
||||
|
||||
Skin SkinFactory::skinInfo(const QString &skin_name, bool *ok) {
|
||||
|
@ -147,7 +146,6 @@ Skin SkinFactory::skinInfo(const QString &skin_name, bool *ok) {
|
|||
skin.m_layoutMarkup = QByteArray::fromBase64(skin.m_layoutMarkup.toLocal8Bit());
|
||||
|
||||
// Obtain other information.
|
||||
// NOTE: Probably fixed bug with "active skin" on Windows.
|
||||
skin.m_baseName = QString(skin_name).replace(QDir::separator(), '/');
|
||||
|
||||
// Free resources.
|
||||
|
@ -179,7 +177,7 @@ QList<Skin> SkinFactory::installedSkins() {
|
|||
foreach (const QString &skin_file, skin_files) {
|
||||
// Check if skin file is valid and add it if it is valid.
|
||||
Skin skin_info = skinInfo(base_directory + QDir::separator() + skin_file,
|
||||
&skin_load_ok);
|
||||
&skin_load_ok);
|
||||
|
||||
if (skin_load_ok) {
|
||||
skins.append(skin_info);
|
||||
|
|
|
@ -21,10 +21,6 @@ struct Skin {
|
|||
|
||||
Q_DECLARE_METATYPE(Skin)
|
||||
|
||||
// NOTE: Skin "base/vergilius.xml" is now NEEDED for rssguard
|
||||
// to run. IT IS DEFAULT skin. It sets no styles and stylesheet.
|
||||
// It just contains markup for webbrowser.
|
||||
|
||||
class SkinFactory : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -33,8 +29,6 @@ class SkinFactory : public QObject {
|
|||
explicit SkinFactory(QObject *parent = 0);
|
||||
|
||||
// Loads the skin from give skin_data.
|
||||
// NOTE: Extra relative path escaping is done for loading of
|
||||
// external resources.
|
||||
bool loadSkinFromData(const Skin &skin);
|
||||
|
||||
public:
|
||||
|
@ -60,8 +54,7 @@ class SkinFactory : public QObject {
|
|||
// Gets skin about a particular skin.
|
||||
Skin skinInfo(const QString &skin_name, bool *ok = NULL);
|
||||
|
||||
// Returns list of installed skins, including "default system skin".
|
||||
// NOTE: Default skin always lies at position 0.
|
||||
// Returns list of installed skins.
|
||||
QList<Skin> installedSkins();
|
||||
|
||||
// Sets the desired skin as the active one if it exists.
|
||||
|
|
|
@ -74,7 +74,6 @@ bool SystemTrayIcon::isSystemTrayAvailable() {
|
|||
}
|
||||
|
||||
bool SystemTrayIcon::isSystemTrayActivated() {
|
||||
// TODO: Check if this can be rewritten for bigger speed.
|
||||
return SystemTrayIcon::isSystemTrayAvailable() && Settings::instance()->value(APP_CFG_GUI,
|
||||
"use_tray_icon",
|
||||
true).toBool();
|
||||
|
|
|
@ -17,7 +17,7 @@ class TabContent : public QWidget {
|
|||
|
||||
// Gets/sets current index of this TabContent.
|
||||
// NOTE: This is the index under which this object lies
|
||||
// in some TabWidget instance.
|
||||
// in parent tab widget.
|
||||
inline virtual int index() const {
|
||||
return m_index;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue