mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-03 18:57:37 +01:00
Some typos, show polls.
This commit is contained in:
parent
3a3c7157b9
commit
ca2934806b
@ -170,6 +170,7 @@ int main(int argc, char* argv[]) {
|
||||
qApp->system()->checkForUpdates();
|
||||
}
|
||||
|
||||
qApp->showPolls();
|
||||
qApp->mainForm()->tabWidget()->feedMessageViewer()->feedsView()->loadAllExpandStates();
|
||||
|
||||
// Enter global event loop.
|
||||
|
@ -83,6 +83,12 @@ Application::~Application() {
|
||||
qDebug("Destroying Application instance.");
|
||||
}
|
||||
|
||||
void Application::showPolls() const {
|
||||
if (isFirstRun(APP_VERSION)) {
|
||||
web()->openUrlInExternalBrowser(QSL("https://goo.gl/forms/7bJNr33Ii22Q1c3k2"));
|
||||
}
|
||||
}
|
||||
|
||||
FeedReader* Application::feedReader() {
|
||||
return m_feedReader;
|
||||
}
|
||||
@ -99,11 +105,11 @@ QList<QAction*> Application::userActions() {
|
||||
return m_userActions;
|
||||
}
|
||||
|
||||
bool Application::isFirstRun() {
|
||||
bool Application::isFirstRun() const {
|
||||
return settings()->value(GROUP(General), SETTING(General::FirstRun)).toBool();
|
||||
}
|
||||
|
||||
bool Application::isFirstRun(const QString& version) {
|
||||
bool Application::isFirstRun(const QString& version) const {
|
||||
if (version == APP_VERSION) {
|
||||
// Check this only if checked version is equal to actual version.
|
||||
return settings()->value(GROUP(General), QString(General::FirstRun) + QL1C('_') + version, true).toBool();
|
||||
@ -113,7 +119,7 @@ bool Application::isFirstRun(const QString& version) {
|
||||
}
|
||||
}
|
||||
|
||||
WebFactory* Application::web() {
|
||||
WebFactory* Application::web() const {
|
||||
return m_webFactory;
|
||||
}
|
||||
|
||||
@ -162,7 +168,7 @@ DownloadManager* Application::downloadManager() {
|
||||
return m_downloadManager;
|
||||
}
|
||||
|
||||
Settings* Application::settings() {
|
||||
Settings* Application::settings() const {
|
||||
return m_settings;
|
||||
}
|
||||
|
||||
|
@ -64,6 +64,8 @@ class Application : public QtSingleApplication {
|
||||
explicit Application(const QString& id, int& argc, char** argv);
|
||||
virtual ~Application();
|
||||
|
||||
void showPolls() const;
|
||||
|
||||
FeedReader* feedReader();
|
||||
|
||||
void setFeedReader(FeedReader* feed_reader);
|
||||
@ -72,19 +74,19 @@ class Application : public QtSingleApplication {
|
||||
QList<QAction*> userActions();
|
||||
|
||||
// Check whether this application starts for the first time (ever).
|
||||
bool isFirstRun();
|
||||
bool isFirstRun() const;
|
||||
|
||||
// Check whether GIVEN VERSION of the application starts for the first time.
|
||||
bool isFirstRun(const QString& version);
|
||||
bool isFirstRun(const QString& version) const;
|
||||
|
||||
WebFactory* web();
|
||||
WebFactory* web() const;
|
||||
SystemFactory* system();
|
||||
SkinFactory* skins();
|
||||
Localization* localization();
|
||||
DatabaseFactory* database();
|
||||
IconFactory* icons();
|
||||
DownloadManager* downloadManager();
|
||||
Settings* settings();
|
||||
Settings* settings() const;
|
||||
Mutex* feedUpdateLock();
|
||||
FormMain* mainForm();
|
||||
QWidget* mainFormWidget();
|
||||
|
@ -62,7 +62,7 @@ bool WebFactory::sendMessageViaEmail(const Message& message) {
|
||||
}
|
||||
}
|
||||
|
||||
bool WebFactory::openUrlInExternalBrowser(const QString& url) {
|
||||
bool WebFactory::openUrlInExternalBrowser(const QString& url) const {
|
||||
if (qApp->settings()->value(GROUP(Browser), SETTING(Browser::CustomExternalBrowserEnabled)).toBool()) {
|
||||
const QString browser = qApp->settings()->value(GROUP(Browser), SETTING(Browser::CustomExternalBrowserExecutable)).toString();
|
||||
const QString arguments = qApp->settings()->value(GROUP(Browser), SETTING(Browser::CustomExternalBrowserArguments)).toString();
|
||||
@ -88,7 +88,7 @@ QString WebFactory::stripTags(QString text) {
|
||||
|
||||
QString WebFactory::escapeHtml(const QString& html) {
|
||||
if (m_escapes.isEmpty()) {
|
||||
genereteEscapes();
|
||||
generateEscapes();
|
||||
}
|
||||
|
||||
QString output = html;
|
||||
@ -211,7 +211,7 @@ QAction* WebFactory::createEngineSettingsAction(const QString& title, QWebEngine
|
||||
|
||||
#endif
|
||||
|
||||
void WebFactory::genereteEscapes() {
|
||||
void WebFactory::generateEscapes() {
|
||||
m_escapes[QSL("<")] = QL1C('<');
|
||||
m_escapes[QSL(">")] = QL1C('>');
|
||||
m_escapes[QSL("&")] = QL1C('&');
|
||||
|
@ -54,7 +54,7 @@ class WebFactory : public QObject {
|
||||
#endif
|
||||
|
||||
public slots:
|
||||
bool openUrlInExternalBrowser(const QString& url);
|
||||
bool openUrlInExternalBrowser(const QString& url) const;
|
||||
bool sendMessageViaEmail(const Message& message);
|
||||
|
||||
#if defined (USE_WEBENGINE)
|
||||
@ -68,7 +68,7 @@ class WebFactory : public QObject {
|
||||
#endif
|
||||
|
||||
private:
|
||||
void genereteEscapes();
|
||||
void generateEscapes();
|
||||
void generateDeescapes();
|
||||
|
||||
QMap<QString, QString> m_escapes;
|
||||
|
Loading…
x
Reference in New Issue
Block a user