Translation improvements
This commit is contained in:
parent
52aa5132b8
commit
e02f4df4c1
37 changed files with 482 additions and 768 deletions
|
|
@ -120,7 +120,6 @@ Page {
|
|||
IconBar {
|
||||
id: controlbar
|
||||
flickable: view
|
||||
theme: "black"
|
||||
IconBarItem {
|
||||
text: qsTr("Back")
|
||||
icon: "image://theme/icon-m-back"
|
||||
|
|
|
|||
|
|
@ -75,12 +75,16 @@ Page {
|
|||
|
||||
LogItem {
|
||||
title: "Pocket integration"
|
||||
description: "Pocket is an Internet tool for saving articles to read later. Integration implemented in Kaktus provides \"Add to Pocket\" button in the articles list and in the web viewer.";
|
||||
description: "Pocket is an Internet tool for saving articles to read later. " +
|
||||
"Integration implemented in Kaktus provides \"Add to Pocket\" " +
|
||||
"button in the articles list and in the web viewer.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: "Share link"
|
||||
description: "\"Share link\" button has been added. Due to Jolla Store restrictions it will be enabled only in OpenRepos package.";
|
||||
description: "\"Share link\" button has been added. " +
|
||||
"Due to Jolla Store restrictions it will be " +
|
||||
"enabled only in OpenRepos package.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
|
|
@ -90,241 +94,10 @@ Page {
|
|||
|
||||
LogItem {
|
||||
title: "Delete web viewer cookies"
|
||||
description: "Option in the settings that allows you to clear cache and cookies of the web viewer."
|
||||
description: "Option in the settings that allows you to clear " +
|
||||
"cache and cookies of the web viewer."
|
||||
}
|
||||
|
||||
/*SectionHeader {
|
||||
text: qsTr("Version %1").arg("2.5.3")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Bug fixes for Netvibes'
|
||||
description: "Bug related to syncing process in Netvibes has been fixed.";
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Version %1").arg("2.5.2")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Bug fixes'
|
||||
description: "Some bugs related to caching process have been fixed.";
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Version %1").arg("2.5.1")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Updated Netvibes API'
|
||||
description: "Fixes for updated Netvibes API.";
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Version %1").arg("2.5.0")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Reader View'
|
||||
description: "Reader View is a feature that strips away clutter like buttons, ads and background images, and changes the page's layout for better readability. Reader View implementation in Kaktus is based on Readability.js library, the same that is used in Firefox browser.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'UI redesign'
|
||||
description: "Some options were moved from pull down menu to the bottom bar and bottom bar has a new dark look.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Unsynced data indicator'
|
||||
description: "When Kaktus has any unsynchronized data, indicator (red dot) is shown on the bottom bar.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Smoother offline mode'
|
||||
description: "A few bugs were fixed and general offline mode experience has been improved.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'List filtering'
|
||||
description: "List of articles can be filtered to display all articles, unread and saved or only unread.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Auto network mode'
|
||||
description: "Option to automatically enabling offline mode on network connection lost.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Night View'
|
||||
description: "Night View reduces the brightness of websites by inverting colors (heavily inspired and code partially borrowed from harbour-webpirate project).";
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Version %1").arg("2.4.0")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'UI improvements for Jolla C/Aqua Fish and other devices'
|
||||
description: "Few UI fixes to better support other devices than Jolla 1.";
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Version %1").arg("2.3.1")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Updated support for Netvibes API'
|
||||
description: "Fixes for updated Netvibes API.";
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Version %1").arg("2.3")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Full content from the RSS feed'
|
||||
description: "New option to set clicking on article behavior. Following actions are possible: Open article in the built-in viewer, Open article in an external browser, Show full content from the RSS feed.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Expanded items'
|
||||
description: "New option to always show all article items on the list view expanded.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Open link behaviour'
|
||||
description: "New option to change how navigation is handled inside built-in viewer.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'UI improvements'
|
||||
description: "Many UI changes were made to improve user experience.";
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Version %1").arg("2.2")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Initial tablet support'
|
||||
description: "Jolla Tablet is now supported.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Double-pane landscape view'
|
||||
description: "Landscape view is rearanged to display content on two panes.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Open articles in an external browser'
|
||||
description: "Context menu option to open article directly in an external web browser instead built-in web viewer.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Icon-based context menu'
|
||||
description: "Context menu can be icon-based (default) or text-based. Inspiration comes form gPodder app.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Updated Netvibes API support'
|
||||
description: "Fixes for updated NV API including, long-awaited, SSL support.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'UI improvements'
|
||||
description: "Some small UI changes to better fit in to new Sailfish 2.0 design style.";
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Version %1").arg("2.1")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Sync read articles'
|
||||
description: "Previously, unread as well as read articles were synced. With this new option comes possibility to disable syncing read articles. It will speed up synchronization, but read articles will not be accessible form Kaktus.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Sort order'
|
||||
description: 'New settings option enabling specific sort order for list of articles. Possible values: Recent first, Oldest first.'
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Mark above as read'
|
||||
description: 'Context menu option for marking all above articles as read.'
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Old Reader: Like & Liked articles view mode'
|
||||
description: "New context option to Like/Unlike article. So called \"Slow\" view mode is now replaced by Liked articles view mode.";
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Old Reader: Enable social features'
|
||||
description: "New option to enable/disable Old Reader's social features. If enabled, following features will be visible: Following folder, Sharing article with followers, Like/Unlike option, Liked articles view mode.";
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Version %1").arg("2.0")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Old Reader support'
|
||||
description: 'Old Reader is supported as new feed aggreagator.'
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Many small improvements and bug fixes'
|
||||
description: 'Many improvements, like performance optimization and UI polishing were made.'
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Version %1").arg("1.4")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'UI polishing'
|
||||
description: 'UI is more in line with Sailfish design style.'
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Remorse popups'
|
||||
description: 'Instead dialog prompts, remorse popups are used.'
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'New translations'
|
||||
description: 'New translations German, Spanish, Finnish, French, Italian and Chinese were added. All other translations have been updated.'
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: qsTr("Version %1").arg("1.3")
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Read mode'
|
||||
description: 'When Read mode is enabled, web pages will be reformatted into an easy to read version. '+
|
||||
'All of a website\'s native styles will be striped so you can focus on what you\'re reading. '+
|
||||
'You can switch to Read mode using rightmost button on web viewer\'s toolbar.'
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Copy URL to clipboard'
|
||||
description: 'New button was added to web viewer\'s toolbar. It allows you to copy page\'s URL to clipboard.'
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Sign in with Twitter or Facebook'
|
||||
description: 'In addition to Netvibes credentials, sign in can be done also with Twitter or Facebook account.'
|
||||
}
|
||||
|
||||
LogItem {
|
||||
title: 'Caching only on WiFi'
|
||||
description: 'Until now you could only enable or disable caching feature. '+
|
||||
'Now, you can also set caching to start only when phone is connected with WiFi.'
|
||||
}*/
|
||||
|
||||
|
||||
Spacer {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ Item {
|
|||
if (dm.online)
|
||||
settings.offlineMode = false;
|
||||
else
|
||||
notification.show(qsTr("Can't switch to online mode because network is disconnected."));
|
||||
notification.show(qsTr("Cannot switch to online mode because network is disconnected."));
|
||||
} else {
|
||||
settings.offlineMode = true;
|
||||
}
|
||||
|
|
@ -360,12 +360,6 @@ Item {
|
|||
anchors.bottom: parent.bottom; anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
width: root.progress * parent.width
|
||||
|
||||
/*gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: Theme.rgba(Theme.highlightColor, 0.4) }
|
||||
GradientStop { position: 1.0; color: Theme.rgba(Theme.highlightColor, 0.0) }
|
||||
}*/
|
||||
|
||||
color: Theme.highlightDimmerColor
|
||||
|
||||
Behavior on width {
|
||||
|
|
@ -473,5 +467,4 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,16 +27,9 @@ CoverBackground {
|
|||
property bool active: status === Cover.Active
|
||||
property bool busy: app.fetcherBusyStatus || dm.busy
|
||||
property string label
|
||||
property string unreadLabel: {
|
||||
if (root.unread==0)
|
||||
return qsTr("All read");
|
||||
if (root.unread==1)
|
||||
return unread + " " + qsTr("unread item");
|
||||
if (root.unread<5)
|
||||
return unread + " " + qsTr("unread items","less than 5 articles are unread");
|
||||
return unread + " " + qsTr("unread items","more or equal 5 articles are unread");
|
||||
}
|
||||
|
||||
property string unreadLabel: unread > 0 ?
|
||||
qsTr("%n unread item(s)", "", unread) :
|
||||
qsTr("All read")
|
||||
onStatusChanged: {
|
||||
if (status === Cover.Active) {
|
||||
root.unread = utils.countUnread();
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ Page {
|
|||
|
||||
ViewPlaceholder {
|
||||
id: placeholder
|
||||
enabled: listView.count == 0
|
||||
enabled: listView.count === 0
|
||||
text: qsTr("No dashboards")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,10 +52,13 @@ ListItem {
|
|||
property bool landscapeMode: false
|
||||
property bool showMarkedAsRead: true
|
||||
property bool hidden: read > 0 && readlater === 0
|
||||
property bool showIcon: settings.viewMode === 1 || settings.viewMode === 3 ||
|
||||
settings.viewMode === 4 || settings.viewMode === 5 ? true : false
|
||||
property bool showIcon: settings.viewMode === 1 ||
|
||||
settings.viewMode === 3 ||
|
||||
settings.viewMode === 4 ||
|
||||
settings.viewMode === 5 ? true : false
|
||||
property bool defaultIcon: feedIcon === "http://s.theoldreader.com/icons/user_icon.png"
|
||||
property color highlightedColor: Theme.rgba(Theme.highlightBackgroundColor, Theme.highlightBackgroundOpacity)
|
||||
property color highlightedColor: Theme.rgba(Theme.highlightBackgroundColor,
|
||||
Theme.highlightBackgroundOpacity)
|
||||
readonly property alias expandable: box.expandable
|
||||
property bool expandedMode: settings.expandedMode
|
||||
|
||||
|
|
@ -77,7 +80,8 @@ ListItem {
|
|||
|
||||
enabled: !last && !daterow
|
||||
|
||||
contentHeight: last ? app.stdHeight : daterow ? dateRowbox.height : box.height + expander.height
|
||||
contentHeight: last ? app.stdHeight :
|
||||
daterow ? dateRowbox.height : box.height + expander.height
|
||||
|
||||
onMenuOpenChanged: { if(menuOpen) app.hideBar() }
|
||||
|
||||
|
|
|
|||
|
|
@ -246,13 +246,13 @@ Page {
|
|||
function check() {
|
||||
// Not allowed while Syncing
|
||||
if (dm.busy || fetcher.busy || dm.removerBusy) {
|
||||
notification.show(qsTr("Wait until current task is complete."));
|
||||
notification.show(qsTr("Wait until current task is complete"));
|
||||
return false
|
||||
}
|
||||
|
||||
// Entry not cached and offline mode enabled
|
||||
if (settings.offlineMode && !model.cached) {
|
||||
notification.show(qsTr("Offline version is not available."));
|
||||
notification.show(qsTr("Offline version is not available"));
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
@ -260,11 +260,11 @@ Page {
|
|||
if (!settings.offlineMode && !dm.online) {
|
||||
if (model.cached) {
|
||||
// Entry cached
|
||||
notification.show(qsTr("Enabling offline mode because network is disconnected."));
|
||||
notification.show(qsTr("Enabling offline mode because network is disconnected"));
|
||||
settings.offlineMode = true;
|
||||
} else {
|
||||
// Entry not cached
|
||||
notification.show(qsTr("Network is disconnected."));
|
||||
notification.show(qsTr("Network is disconnected"));
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
@ -291,7 +291,7 @@ Page {
|
|||
function showEntryFeedContent() {
|
||||
// Not allowed while Syncing
|
||||
if (dm.busy || fetcher.busy || dm.removerBusy) {
|
||||
notification.show(qsTr("Wait until current task is complete."))
|
||||
notification.show(qsTr("Wait until current task is complete"))
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
@ -479,7 +479,8 @@ Page {
|
|||
enabled: listView.count === 0
|
||||
text: fetcher.busy ? qsTr("Wait until sync finish") :
|
||||
settings.viewMode === 4 ? app.isNetvibes ? qsTr("No saved items") : qsTr("No starred items") :
|
||||
settings.viewMode === 6 ? qsTr("No liked items") : settings.showOnlyUnread ? qsTr("No unread items") : qsTr("No items")
|
||||
settings.viewMode === 6 ? qsTr("No liked items") :
|
||||
settings.showOnlyUnread ? qsTr("No unread items") : qsTr("No items")
|
||||
}
|
||||
|
||||
VerticalScrollDecorator {
|
||||
|
|
@ -501,7 +502,7 @@ Page {
|
|||
|
||||
onClicked: {
|
||||
var delegate = root.expandedDelegate ?
|
||||
root.expandedDelegate : root.expandedUid !="" ?
|
||||
root.expandedDelegate : root.expandedUid.length > 0 ?
|
||||
getDelegateByUid(root.expandedUid) : undefined
|
||||
if (delegate)
|
||||
delegate.openEntry()
|
||||
|
|
@ -509,7 +510,7 @@ Page {
|
|||
|
||||
onOpenClicked: {
|
||||
var delegate = root.expandedDelegate ?
|
||||
root.expandedDelegate : root.expandedUid !="" ?
|
||||
root.expandedDelegate : root.expandedUid.length > 0 ?
|
||||
getDelegateByUid(root.expandedUid) : undefined
|
||||
if (delegate)
|
||||
delegate.openEntry()
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ Page {
|
|||
model: VisualItemModel {
|
||||
|
||||
Label {
|
||||
text: qsTr("Sorry, something went wrong!")
|
||||
text: qsTr("Sorry, something went wrong :-(")
|
||||
}
|
||||
|
||||
Label {
|
||||
|
|
|
|||
|
|
@ -116,13 +116,13 @@ Page {
|
|||
function check() {
|
||||
// Not allowed while Syncing
|
||||
if (dm.busy || fetcher.busy || dm.removerBusy) {
|
||||
notification.show(qsTr("Wait until current task is complete."));
|
||||
notification.show(qsTr("Wait until current task is complete"));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Entry not cached and offline mode enabled
|
||||
if (settings.offlineMode && !cached) {
|
||||
notification.show(qsTr("Offline version not available."));
|
||||
notification.show(qsTr("Offline version not available"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -130,11 +130,11 @@ Page {
|
|||
if (!settings.offlineMode && !dm.online) {
|
||||
if (cached) {
|
||||
// Entry cached
|
||||
notification.show(qsTr("Enabling offline mode because network is disconnected."));
|
||||
notification.show(qsTr("Enabling offline mode because network is disconnected"));
|
||||
settings.offlineMode = true;
|
||||
} else {
|
||||
// Entry not cached
|
||||
notification.show(qsTr("Network is disconnected."));
|
||||
notification.show(qsTr("Network is disconnected"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -143,8 +143,7 @@ Page {
|
|||
}
|
||||
|
||||
function openEntryInBrowser() {
|
||||
notification.show(qsTr("Launching a browser..."));
|
||||
Qt.openUrlExternally(onlineUrl)
|
||||
openUrlEntryInBrowser(onlineUrl)
|
||||
}
|
||||
|
||||
function openUrlEntryInBrowser(url) {
|
||||
|
|
@ -469,7 +468,7 @@ Page {
|
|||
text: qsTr("Copy URL")
|
||||
icon: "image://theme/icon-m-clipboard"
|
||||
onClicked: {
|
||||
notification.show(qsTr("URL was copied to the clipboard."));
|
||||
notification.show(qsTr("URL was copied to the clipboard"));
|
||||
Clipboard.text = root.onlineUrl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ Page {
|
|||
enabled: true
|
||||
text: settings.signedIn ?
|
||||
app.fetcherBusyStatus || dm.busy ? qsTr("Wait until sync finish") :
|
||||
qsTr("To do feeds synchronization, pull down and select sync.") :
|
||||
qsTr("You are not signed in to any account. Pull down to add one.")
|
||||
qsTr("To do feeds synchronization, pull down and select sync") :
|
||||
qsTr("You are not signed in to any account, pull down to add one")
|
||||
}
|
||||
|
||||
VerticalScrollDecorator {
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ Rectangle {
|
|||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
text: qsTr("Tap anywhere to continue.");
|
||||
text: qsTr("Tap anywhere to continue");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ Dialog {
|
|||
Label {
|
||||
id: label
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: qsTr("Netvibes")
|
||||
text: "Netvibes"
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
}
|
||||
|
|
@ -91,7 +91,7 @@ Dialog {
|
|||
|
||||
inputMethodHints: Qt.ImhEmailCharactersOnly | Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
|
||||
placeholderText: qsTr("Enter username")
|
||||
label: qsTr("Username (your e-mail address)")
|
||||
label: qsTr("Username")
|
||||
|
||||
Component.onCompleted: {
|
||||
text = settings.getUsername();
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ Dialog {
|
|||
Label {
|
||||
id: label
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: qsTr("Old Reader")
|
||||
text: "Old Reader"
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ Dialog {
|
|||
|
||||
inputMethodHints: Qt.ImhEmailCharactersOnly| Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
|
||||
placeholderText: qsTr("Enter username")
|
||||
label: qsTr("Username (your e-mail address)")
|
||||
label: qsTr("Username")
|
||||
|
||||
Component.onCompleted: {
|
||||
text = settings.getUsername();
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ PullDownMenu {
|
|||
if (dm.online)
|
||||
settings.offlineMode = false;
|
||||
else
|
||||
notification.show(qsTr("Can't switch to online mode because network is disconnected."));
|
||||
notification.show(qsTr("Cannot switch to online mode because network is disconnected"));
|
||||
} else {
|
||||
settings.offlineMode = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ Item {
|
|||
}, function(code) {
|
||||
console.log("X-Error:" + xhr.getResponseHeader("X-Error"))
|
||||
console.log("Error while requesting Pocket token, X-Error-Code:" + code)
|
||||
notification.show(qsTr("Pocket authorization has failed."))
|
||||
notification.show(qsTr("Pocket authorization has failed"))
|
||||
busy = false
|
||||
})
|
||||
}
|
||||
|
|
@ -71,12 +71,12 @@ Item {
|
|||
console.log("access token: " + root.access_token)
|
||||
settings.pocketToken = root.access_token
|
||||
settings.pocketEnabled = true
|
||||
notification.show(qsTr("Pocket authorization was successful."))
|
||||
notification.show(qsTr("Pocket authorization was successful"))
|
||||
busy = false
|
||||
}, function(code) {
|
||||
console.log("X-Error:" + xhr.getResponseHeader("X-Error"))
|
||||
console.log("Error while requesting Pocket access token, X-Error-Code:" + code)
|
||||
notification.show(qsTr("Pocket authorization has failed."))
|
||||
notification.show(qsTr("Pocket authorization has failed"))
|
||||
busy = false
|
||||
})
|
||||
}
|
||||
|
|
@ -114,13 +114,13 @@ Item {
|
|||
if(xhr.readyState === XMLHttpRequest.DONE) {
|
||||
busy = false
|
||||
if (xhr.status === 200) {
|
||||
notification.show(qsTr("Article has been successfully added to Pocket."))
|
||||
notification.show(qsTr("Article has been successfully added to Pocket"))
|
||||
settings.pocketTagsHistory = _split(settings.pocketTagsHistory + "," + tags).sort().join(",")
|
||||
} else {
|
||||
console.log("X-Error:" + xhr.getResponseHeader("X-Error"))
|
||||
var code = xhr.getResponseHeader("X-Error-Code")
|
||||
console.log("Error while adding article to Pocket, X-Error-Code:" + code)
|
||||
notification.show(qsTr("Error while adding article to Pocket."))
|
||||
notification.show(qsTr("Error while adding article to Pocket"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,6 @@ Page {
|
|||
IconBar {
|
||||
id: controlbar
|
||||
flickable: view
|
||||
theme: "black"
|
||||
IconBarItem {
|
||||
text: qsTr("Back")
|
||||
icon: "image://theme/icon-m-back"
|
||||
|
|
|
|||
|
|
@ -88,5 +88,4 @@ Dialog {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ Page {
|
|||
anchors.rightMargin: Theme.paddingLarge
|
||||
|
||||
Label {
|
||||
text: qsTr("Not signed in ")
|
||||
text: qsTr("Not signed in")
|
||||
visible: !settings.signedIn
|
||||
}
|
||||
Label {
|
||||
|
|
@ -435,7 +435,7 @@ Page {
|
|||
description: qsTr("Clear web viewer cache and cookies. Changes will take effect after restart.")
|
||||
button.onClicked: {
|
||||
utils.resetQtWebKit()
|
||||
notification.show(qsTr("Cache and cookies have been deleted."))
|
||||
notification.show(qsTr("Cache and cookies have been deleted"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -520,7 +520,7 @@ Page {
|
|||
}
|
||||
|
||||
function showMessage() {
|
||||
notification.show(qsTr("Changes will take effect after you restart Kaktus."));
|
||||
notification.show(qsTr("Changes will take effect after you restart Kaktus"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -895,7 +895,7 @@ Page {
|
|||
button.text: qsTr("Delete saved tags")
|
||||
button.onClicked: {
|
||||
settings.pocketTagsHistory = ""
|
||||
notification.show(qsTr("Saved tags have been deleted."))
|
||||
notification.show(qsTr("Saved tags have been deleted"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Dialog {
|
|||
property int index
|
||||
property bool actionDone: false
|
||||
|
||||
canAccept: note.text != ""
|
||||
canAccept: note.text.length > 0
|
||||
|
||||
allowedOrientations: {
|
||||
switch (settings.allowedOrientations) {
|
||||
|
|
|
|||
|
|
@ -65,12 +65,12 @@ Dialog {
|
|||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.primaryColor
|
||||
text: settings.signinType < 10 ?
|
||||
qsTr("Disconnect Kaktus from Netvibes account?") :
|
||||
qsTr("Disconnect Netvibes account?") :
|
||||
settings.signinType < 20 ?
|
||||
qsTr("Disconnect Kaktus from Old Reader account?") :
|
||||
qsTr("Disconnect Old Reader account?") :
|
||||
settings.signinType < 30 ?
|
||||
qsTr("Disconnect Kaktus from Feedly account?") :
|
||||
qsTr("Disconnect Kaktus from Tiny Tiny RSS account?")
|
||||
qsTr("Disconnect Feedly account?") :
|
||||
qsTr("Disconnect Tiny Tiny RSS account?")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ Dialog {
|
|||
Label {
|
||||
id: label
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: qsTr("Tiny Tiny Rss")
|
||||
text: "Tiny Tiny Rss"
|
||||
color: Theme.highlightColor
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
}
|
||||
|
|
@ -149,11 +149,6 @@ Dialog {
|
|||
}
|
||||
}
|
||||
|
||||
function validateEmail(email) {
|
||||
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
return re.test(email);
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
settings.setUrl(url.text);
|
||||
settings.setUsername(user.text);
|
||||
|
|
|
|||
|
|
@ -275,9 +275,9 @@ Page {
|
|||
proggressPanel.open = false;
|
||||
|
||||
if (_settings.offlineMode) {
|
||||
notification.show(qsTr("Failed to load page from local cache."));
|
||||
notification.show(qsTr("Failed to load page from local cache"));
|
||||
} else {
|
||||
notification.show(qsTr("Failed to load page content."));
|
||||
notification.show(qsTr("Failed to load page content"));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -457,7 +457,7 @@ Page {
|
|||
text: qsTr("Copy URL")
|
||||
icon: "image://theme/icon-m-clipboard"
|
||||
onClicked: {
|
||||
notification.show(qsTr("URL was copied to the clipboard."));
|
||||
notification.show(qsTr("URL was copied to the clipboard"));
|
||||
Clipboard.text = root.onlineUrl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ ApplicationWindow {
|
|||
target: settings
|
||||
|
||||
onError: {
|
||||
console.log("Settings error! code=" + code);
|
||||
console.log("Settings error: code=" + code);
|
||||
Qt.quit();
|
||||
}
|
||||
|
||||
|
|
@ -158,10 +158,10 @@ ApplicationWindow {
|
|||
target: db
|
||||
|
||||
onError: {
|
||||
console.log("DB error! code="+code);
|
||||
console.log("DB error: code="+code);
|
||||
|
||||
if (code==511) {
|
||||
notification.show(qsTr("Restart the app to rebuild cache data."), qsTr("Something went wrong!"));
|
||||
notification.show(qsTr("Restart the app to rebuild cache data"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
onNetworkNotAccessible: {
|
||||
notification.show(qsTr("Download has failed because network is disconnected."));
|
||||
notification.show(qsTr("Download has failed because network is disconnected"));
|
||||
}
|
||||
|
||||
onRemoverProgressChanged: {
|
||||
|
|
@ -290,21 +290,21 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
function fetcherErrorGettingAuthUrl() {
|
||||
notification.show(qsTr("Something went wrong. Unable to sign in!"));
|
||||
notification.show(qsTr("Unable to sign in"));
|
||||
}
|
||||
|
||||
function fetcherNetworkNotAccessible() {
|
||||
notification.show(qsTr("Sync failed!\nNetwork connection is unavailable."));
|
||||
notification.show(qsTr("Network connection is unavailable"));
|
||||
}
|
||||
|
||||
function fetcherError(code) {
|
||||
console.log("Fetcher error, code=" + code);
|
||||
console.log("Fetcher error: code=" + code);
|
||||
|
||||
if (code < 400)
|
||||
return;
|
||||
if (code === 700 || (code >= 400 && code < 500)) {
|
||||
if (code === 402)
|
||||
notification.show(qsTr("The user name or password is incorrect!"));
|
||||
notification.show(qsTr("The user name or password is incorrect"));
|
||||
else if (code === 404) // TT-RSS API disabled
|
||||
notification.show(qsTr("Access through API is disabled on a server"));
|
||||
else if (code === 700) // SSL error
|
||||
|
|
@ -325,9 +325,9 @@ ApplicationWindow {
|
|||
return;
|
||||
}
|
||||
} else if (code === 800) {
|
||||
notification.show(qsTr("Cannot save image"));
|
||||
notification.show(qsTr("Cannot save image in gallery"));
|
||||
} else if (code === 801) {
|
||||
notification.show(qsTr("Image file already exists"));
|
||||
notification.show(qsTr("Image already exists in gallery"));
|
||||
} else {
|
||||
// Unknown error
|
||||
notification.show(qsTr("Unknown error"));
|
||||
|
|
@ -336,16 +336,16 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
function fetcherErrorCheckingCredentials() {
|
||||
notification.show(qsTr("The user name or password is incorrect."));
|
||||
notification.show(qsTr("The user name or password is incorrect"));
|
||||
}
|
||||
|
||||
function fetcherCredentialsValid() {
|
||||
notification.show(qsTr("You are signed in."));
|
||||
notification.show(qsTr("You are signed in"));
|
||||
}
|
||||
|
||||
function fetcherProgress(current, total) {
|
||||
//console.log("fetcherProgress", current, total);
|
||||
bar.progressText = qsTr("Receiving data... ");
|
||||
bar.progressText = qsTr("Receiving data...");
|
||||
bar.progress = current / total;
|
||||
}
|
||||
|
||||
|
|
@ -403,7 +403,7 @@ ApplicationWindow {
|
|||
|
||||
function fetcherImageSaved(filename) {
|
||||
//console.log("fetcherImageSaved: " + filename)
|
||||
notification.show(qsTr("Image saved as \"" + filename + "\""));
|
||||
notification.show(qsTr("Image saved in gallery as \"" + filename + "\""));
|
||||
}
|
||||
|
||||
Notification {
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ bool FilteringWorker::filterArticle()
|
|||
return false;
|
||||
QString cap = rx1.cap(0);
|
||||
if (cap != "") {
|
||||
//qDebug() << "article!";
|
||||
//qDebug() << "article";
|
||||
articles.append(cap);
|
||||
}
|
||||
pos += rx1.matchedLength();
|
||||
|
|
@ -273,7 +273,7 @@ void FilteringWorker::filterOffline()
|
|||
QFile file(cacheDir + "/" + filename);
|
||||
|
||||
if (!QFile::exists(cacheDir + "/" + filename)) {
|
||||
qWarning() << "File " << filename << "does not exists!";
|
||||
qWarning() << "File " << filename << "does not exists";
|
||||
file.close();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -312,7 +312,7 @@ CacheServer::CacheServer(QObject *parent) :
|
|||
this, SLOT(handle(QHttpRequest*, QHttpResponse*)));
|
||||
|
||||
if (!server->listen(port)) {
|
||||
qWarning() << "Cache server at localhost failed to start on" << this->port << "port!";
|
||||
qWarning() << "Cache server at localhost failed to start on" << this->port << "port";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ bool CacheServer::readFile(const QString &filename, QByteArray &data)
|
|||
QFile file(cacheDir + "/" + filename);
|
||||
|
||||
if (!QFile::exists(cacheDir + "/" + filename)) {
|
||||
qWarning() << "File " << filename << "does not exists!";
|
||||
qWarning() << "File " << filename << "does not exists";
|
||||
file.close();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -401,7 +401,7 @@ QString CacheServer::getFileUrl(const QString &id)
|
|||
QString path = s->getDmCacheDir() + "/" + filename;
|
||||
|
||||
if (!QFile::exists(path)) {
|
||||
qWarning() << "File " << path << "does not exists!";
|
||||
qWarning() << "File " << path << "does not exists";
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -192,7 +192,7 @@ void DownloadManager::networkAccessibleChanged(QNetworkAccessManager::NetworkAcc
|
|||
case QNetworkAccessManager::UnknownAccessibility:
|
||||
break;
|
||||
case QNetworkAccessManager::NotAccessible:
|
||||
qWarning() << "Network is not accessible!";
|
||||
qWarning() << "Network is not accessible";
|
||||
cancel();
|
||||
emit networkNotAccessible();
|
||||
break;
|
||||
|
|
@ -360,7 +360,7 @@ void DownloadManager::downloadFinished(QNetworkReply *reply)
|
|||
QString newFinalUrl = url.resolved(reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl()).toString();
|
||||
if (item.finalUrl == newFinalUrl || item.redirectUrl == newFinalUrl) {
|
||||
// Redirection loop detected -> skiping item
|
||||
qWarning() << "Redirection loop detected!";
|
||||
qWarning() << "Redirection loop detected";
|
||||
downloads.removeOne(reply);
|
||||
reply->deleteLater();
|
||||
addNextDownload();
|
||||
|
|
@ -493,7 +493,7 @@ bool DownloadManager::checkIfHeadersAreValid(QNetworkReply *reply)
|
|||
return false;
|
||||
}
|
||||
}
|
||||
//qDebug() << "headers are valid!";
|
||||
//qDebug() << "headers are valid";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -512,7 +512,7 @@ void DownloadManager::scanHtml(const QByteArray &content, const QUrl &url)
|
|||
if (!isUrlinQueue(item.origUrl, item.finalUrl))
|
||||
addDownload(item);
|
||||
else
|
||||
//qDebug() << "scanHtml, Url is in the queue!";
|
||||
//qDebug() << "scanHtml, Url is in the queue";
|
||||
|
||||
pos += rxCss.matchedLength();
|
||||
++i;
|
||||
|
|
@ -655,7 +655,7 @@ void DownloadManager::startFeedDownload()
|
|||
|
||||
//qDebug() << "DownloadManager::startFeedDownload()";
|
||||
if (!ncm.isOnline()) {
|
||||
qWarning() << "Network is offline!";
|
||||
qWarning() << "Network is offline";
|
||||
//emit networkNotAccessible();
|
||||
//return false;
|
||||
}
|
||||
|
|
@ -757,9 +757,9 @@ void CacheCleaner::cleanOr()
|
|||
Q_FOREACH(QFileInfo info, infoList){
|
||||
if (info.created() < date) {
|
||||
if (QFile::remove(info.absoluteFilePath())) {
|
||||
qDebug() << "Cache cleaner:" << info.fileName() << "deleted!";
|
||||
qDebug() << "Cache cleaner:" << info.fileName() << "deleted";
|
||||
} else {
|
||||
qWarning() << "Cache cleaner:" << info.fileName() << " is old but can not be deleted!";
|
||||
qWarning() << "Cache cleaner:" << info.fileName() << " is old but can not be deleted";
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
|
|
@ -883,7 +883,7 @@ void DownloadAdder::run()
|
|||
//qDebug() << "startFeedDownload, list.count=" << list.count();
|
||||
|
||||
if (list.isEmpty()) {
|
||||
qWarning() << "No feeds to download!";
|
||||
qWarning() << "No feeds to download";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ void EntryModel::initFinished()
|
|||
if (item->id() == id)
|
||||
return i;
|
||||
}
|
||||
qWarning() << "Entry ID not found!";
|
||||
qWarning() << "Entry ID not found";
|
||||
return -1;
|
||||
}*/
|
||||
|
||||
|
|
@ -364,7 +364,7 @@ void EntryModel::setAllAsUnread()
|
|||
|
||||
if (s->getSigninType() >= 10) {
|
||||
// setAllAsUnread not supported in API
|
||||
qWarning() << "Mark all as unread is not supported!";
|
||||
qWarning() << "Mark all as unread is not supported";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -716,7 +716,7 @@ void EntryModel::setData(int row, const QString &fieldName, QVariant newValue, Q
|
|||
#endif
|
||||
if (s->getSigninType() < 10 && s->getSigninType() >= 20) {
|
||||
// Broadcast not supported in API
|
||||
qWarning() << "Broadcast is not supported!";
|
||||
qWarning() << "Broadcast is not supported";
|
||||
return;
|
||||
}
|
||||
item->setBroadcast(newValue.toBool(),newValue2.toString());
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ void FeedModel::markAsUnread(int row)
|
|||
|
||||
if (s->getSigninType() >= 10) {
|
||||
// markAsUnread not supported in API
|
||||
qWarning() << "Mark feed as unread is not supported!";
|
||||
qWarning() << "Mark feed as unread is not supported";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -204,7 +204,7 @@ void FeedModel::setAllAsUnread()
|
|||
|
||||
if (s->getSigninType() >= 10) {
|
||||
// setAllAsUnread not supported in API
|
||||
qWarning() << "Mark tab as unread is not supported!";
|
||||
qWarning() << "Mark tab as unread is not supported";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ void Fetcher::setBusy(bool busy, Fetcher::BusyType type)
|
|||
bool Fetcher::init()
|
||||
{
|
||||
if (busy) {
|
||||
qWarning() << "Fetcher is busy!";
|
||||
qWarning() << "Fetcher is busy";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ bool Fetcher::init()
|
|||
bool Fetcher::update()
|
||||
{
|
||||
if (busy) {
|
||||
qWarning() << "Fetcher is busy!";
|
||||
qWarning() << "Fetcher is busy";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ void Fetcher::cancel()
|
|||
// Restoring backup
|
||||
auto db = DatabaseManager::instance();
|
||||
if (!db->restoreBackup()) {
|
||||
qWarning() << "Unable to restore DB backup!";
|
||||
qWarning() << "Unable to restore DB backup";
|
||||
}
|
||||
|
||||
if (currentReply != NULL)
|
||||
|
|
@ -181,7 +181,7 @@ void Fetcher::cancel()
|
|||
bool Fetcher::checkCredentials()
|
||||
{
|
||||
if (busy) {
|
||||
qWarning() << "Fetcher is busy!";
|
||||
qWarning() << "Fetcher is busy";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -214,7 +214,7 @@ void Fetcher::networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibili
|
|||
case QNetworkAccessManager::UnknownAccessibility:
|
||||
break;
|
||||
case QNetworkAccessManager::NotAccessible:
|
||||
qWarning() << "Network is not accessible!";
|
||||
qWarning() << "Network is not accessible";
|
||||
cancel();
|
||||
emit networkNotAccessible();
|
||||
break;
|
||||
|
|
@ -230,7 +230,7 @@ bool Fetcher::delayedUpdate(bool state)
|
|||
|
||||
#ifdef ONLINE_CHECK
|
||||
if (!state) {
|
||||
qWarning() << "Network is Offline!";
|
||||
qWarning() << "Network is Offline";
|
||||
emit networkNotAccessible();
|
||||
setBusy(false);
|
||||
return false;
|
||||
|
|
@ -248,7 +248,7 @@ bool Fetcher::delayedUpdate(bool state)
|
|||
setBusy(true, Fetcher::CheckingCredentials);
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Wrong busy state!";
|
||||
qWarning() << "Wrong busy state";
|
||||
setBusy(false);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -297,7 +297,7 @@ bool Fetcher::parse()
|
|||
bool ok;
|
||||
QVariant result = qjson.parse(data, &ok);
|
||||
if (!ok) {
|
||||
qWarning() << "An error occurred during parsing Json!";
|
||||
qWarning() << "An error occurred during parsing Json";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ bool Fetcher::parse()
|
|||
}
|
||||
#endif
|
||||
//qDebug() << "parse time:" << (QDateTime::currentMSecsSinceEpoch() - date1);
|
||||
qWarning() << "Json doc is empty!";
|
||||
qWarning() << "Json doc is empty";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -395,11 +395,11 @@ void Fetcher::prepareUploadActions()
|
|||
auto db = DatabaseManager::instance();
|
||||
actionsList = db->readActions();
|
||||
if (actionsList.isEmpty()) {
|
||||
//qDebug() << "No actions to upload!";
|
||||
//qDebug() << "No actions to upload";
|
||||
startFetching();
|
||||
} else {
|
||||
|
||||
//qDebug() << actionsList.count() << " actions to upload!";
|
||||
//qDebug() << actionsList.count() << " actions to upload";
|
||||
|
||||
// Actions optimization
|
||||
// 1. Merging series of SetRead into SetListRead
|
||||
|
|
@ -409,7 +409,7 @@ void Fetcher::prepareUploadActions()
|
|||
/*mergeActionsIntoList(DatabaseManager::SetSaved, DatabaseManager::UnSetSaved,
|
||||
DatabaseManager::SetListSaved, DatabaseManager::UnSetListSaved);*/
|
||||
|
||||
//qDebug() << actionsList.count() << " actions to upload after opt!";
|
||||
//qDebug() << actionsList.count() << " actions to upload after opt";
|
||||
|
||||
this->uploadProggressTotal = actionsList.size();
|
||||
uploadActions();
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ QString IconProvider::themeDirPath()
|
|||
}
|
||||
|
||||
if (!QDir(themeDir).exists()) {
|
||||
qWarning() << "Theme" << themeDir << "for ratio" << ratio << "doesn't exist!";
|
||||
qWarning() << "Theme" << themeDir << "for ratio" << ratio << "doesn't exist";
|
||||
themeDir = SailfishApp::pathTo("images/z1.0").toString(QUrl::RemoveScheme);
|
||||
}
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ int main(int argc, char *argv[])
|
|||
engine->addImageProvider(QLatin1String("nvicons"), new NvIconProvider);
|
||||
|
||||
qRegisterMetaType<DatabaseManager::CacheItem>("CacheItem");
|
||||
|
||||
/*
|
||||
#ifdef SAILFISH
|
||||
//-- temp fix --
|
||||
// config file
|
||||
|
|
@ -115,6 +115,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
//--
|
||||
#endif
|
||||
*/
|
||||
|
||||
Settings *settings = Settings::instance();
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ void NvFetcher::signIn()
|
|||
switch (type) {
|
||||
case 0:
|
||||
if (password == "" || username == "") {
|
||||
qWarning() << "Netvibes username or password is empty!";
|
||||
qWarning() << "Netvibes username or password is empty";
|
||||
if (busyType == Fetcher::CheckingCredentials)
|
||||
emit errorCheckingCredentials(400);
|
||||
else
|
||||
|
|
@ -77,7 +77,7 @@ void NvFetcher::signIn()
|
|||
case 1:
|
||||
case 2:
|
||||
if (twitterCookie == "" || authUrl == "") {
|
||||
qWarning() << "Twitter or Facebook sign in failed!";
|
||||
qWarning() << "Twitter or Facebook sign in failed";
|
||||
if (busyType == Fetcher::CheckingCredentials)
|
||||
emit errorCheckingCredentials(400);
|
||||
else
|
||||
|
|
@ -90,7 +90,7 @@ void NvFetcher::signIn()
|
|||
currentReply = nam.get(request);
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Invalid sign in type!";
|
||||
qWarning() << "Invalid sign in type";
|
||||
emit error(500);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -113,7 +113,7 @@ void NvFetcher::startFetching()
|
|||
|
||||
//Backup
|
||||
if (!db->makeBackup()) {
|
||||
qWarning() << "Unable to make DB backup!";
|
||||
qWarning() << "Unable to make DB backup";
|
||||
emit error(506);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -399,7 +399,7 @@ void NvFetcher::setAction()
|
|||
QList<DatabaseManager::StreamModuleTab> list = db->readStreamModuleTabListByTab(action.id1);
|
||||
|
||||
if (list.empty()) {
|
||||
qWarning() << "Action is broken!";
|
||||
qWarning() << "Action is broken";
|
||||
removeAction();
|
||||
return;
|
||||
}
|
||||
|
|
@ -427,7 +427,7 @@ void NvFetcher::setAction()
|
|||
QList<DatabaseManager::StreamModuleTab> list = db->readStreamModuleTabListByDashboard(s->getDashboardInUse());
|
||||
|
||||
if (list.empty()) {
|
||||
qWarning() << "Action is broken!";
|
||||
qWarning() << "Action is broken";
|
||||
removeAction();
|
||||
return;
|
||||
}
|
||||
|
|
@ -455,7 +455,7 @@ void NvFetcher::setAction()
|
|||
QList<DatabaseManager::StreamModuleTab> list = db->readSlowStreamModuleTabListByDashboard(s->getDashboardInUse());
|
||||
|
||||
if (list.empty()) {
|
||||
qWarning() << "Action is broken!";
|
||||
qWarning() << "Action is broken";
|
||||
removeAction();
|
||||
return;
|
||||
}
|
||||
|
|
@ -493,7 +493,7 @@ void NvFetcher::setAction()
|
|||
action.type == DatabaseManager::UnSetSaved ) {
|
||||
|
||||
if (action.date1==0) {
|
||||
qWarning() << "PublishedAt date is 0!";
|
||||
qWarning() << "PublishedAt date is 0";
|
||||
}
|
||||
|
||||
actions += QString("{\"streams\":[{\"id\":\"%1\",\"items\":[{"
|
||||
|
|
@ -566,7 +566,7 @@ bool NvFetcher::setConnectUrl(const QString &url)
|
|||
void NvFetcher::getConnectUrl(int type)
|
||||
{
|
||||
if (busy) {
|
||||
qWarning() << "Fetcher is busy!";
|
||||
qWarning() << "Fetcher is busy";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -592,7 +592,7 @@ void NvFetcher::getConnectUrl(int type)
|
|||
currentReply = nam.post(request,"callbackUrl=%2Fconnect%2Ffacebook&service=facebook");
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Wrong sign in type!";
|
||||
qWarning() << "Wrong sign in type";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -606,7 +606,7 @@ void NvFetcher::getConnectUrl(int type)
|
|||
void NvFetcher::finishedGetAuthUrl()
|
||||
{
|
||||
if (currentReply != NULL && currentReply->error()) {
|
||||
qWarning() << "Error while getting authentication URL!";
|
||||
qWarning() << "Error while getting authentication URL";
|
||||
setBusy(false);
|
||||
emit errorGettingAuthUrl();
|
||||
return;
|
||||
|
|
@ -620,7 +620,7 @@ void NvFetcher::finishedGetAuthUrl()
|
|||
QString url = jsonObj["url"].toString();
|
||||
|
||||
if (url == "") {
|
||||
qWarning() << "Authentication URL is empty!";
|
||||
qWarning() << "Authentication URL is empty";
|
||||
setBusy(false);
|
||||
emit errorGettingAuthUrl();
|
||||
return;
|
||||
|
|
@ -650,7 +650,7 @@ void NvFetcher::finishedGetAuthUrl()
|
|||
}
|
||||
}
|
||||
|
||||
qWarning() << "Can not get authentication URL!";
|
||||
qWarning() << "Can not get authentication URL";
|
||||
setBusy(false);
|
||||
emit errorGettingAuthUrl();
|
||||
}
|
||||
|
|
@ -664,13 +664,13 @@ void NvFetcher::finishedSignIn()
|
|||
if (currentReply->error() &&
|
||||
currentReply->error()!=QNetworkReply::OperationCanceledError) {
|
||||
if (s->getSigninType()>0) {
|
||||
qWarning() << "Sign in with social service failed!";
|
||||
qWarning() << "Sign in with social service failed";
|
||||
emit error(403);
|
||||
setBusy(false);
|
||||
return;
|
||||
}
|
||||
|
||||
qWarning() << "Sign in failed!";
|
||||
qWarning() << "Sign in failed";
|
||||
emit error(501);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -702,7 +702,7 @@ void NvFetcher::finishedSignIn()
|
|||
}
|
||||
} else {
|
||||
s->setSignedIn(false);
|
||||
qWarning() << "Sign in failed!";
|
||||
qWarning() << "Sign in failed";
|
||||
emit error(501);
|
||||
setBusy(false);
|
||||
}
|
||||
|
|
@ -711,7 +711,7 @@ void NvFetcher::finishedSignIn()
|
|||
case 2:
|
||||
if (!checkCookie(cookie)) {
|
||||
s->setSignedIn(false);
|
||||
qWarning() << "Sign in failed!";
|
||||
qWarning() << "Sign in failed";
|
||||
emit error(501);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -723,7 +723,7 @@ void NvFetcher::finishedSignIn()
|
|||
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Invalid sign in type!";
|
||||
qWarning() << "Invalid sign in type";
|
||||
emit error(501);
|
||||
setBusy(false);
|
||||
s->setSignedIn(false);
|
||||
|
|
@ -736,7 +736,7 @@ void NvFetcher::finishedSignInOnlyCheck()
|
|||
//qDebug() << this->_data;
|
||||
if (currentReply->error() &&
|
||||
currentReply->error()!=QNetworkReply::OperationCanceledError) {
|
||||
qWarning() << "Sign in failed!";
|
||||
qWarning() << "Sign in failed";
|
||||
emit errorCheckingCredentials(501);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -766,7 +766,7 @@ void NvFetcher::finishedSignInOnlyCheck()
|
|||
}
|
||||
} else {
|
||||
s->setSignedIn(false);
|
||||
qWarning() << "Sign in check failed!";
|
||||
qWarning() << "Sign in check failed";
|
||||
emit errorCheckingCredentials(501);
|
||||
setBusy(false);
|
||||
}
|
||||
|
|
@ -775,7 +775,7 @@ void NvFetcher::finishedSignInOnlyCheck()
|
|||
case 2:
|
||||
if (!checkCookie(cookie)) {
|
||||
s->setSignedIn(false);
|
||||
qWarning() << "Sign in check failed!";
|
||||
qWarning() << "Sign in check failed";
|
||||
emit errorCheckingCredentials(501);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -786,7 +786,7 @@ void NvFetcher::finishedSignInOnlyCheck()
|
|||
setBusy(false);
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Invalid sign in type!";
|
||||
qWarning() << "Invalid sign in type";
|
||||
emit errorCheckingCredentials(501);
|
||||
setBusy(false);
|
||||
s->setSignedIn(false);
|
||||
|
|
@ -814,7 +814,7 @@ void NvFetcher::finishedDashboards()
|
|||
// Restoring backup
|
||||
auto db = DatabaseManager::instance();
|
||||
if (!db->restoreBackup()) {
|
||||
qWarning() << "Unable to restore DB backup!";
|
||||
qWarning() << "Unable to restore DB backup";
|
||||
}
|
||||
|
||||
emit error(500);
|
||||
|
|
@ -841,12 +841,12 @@ void NvFetcher::finishedDashboards2()
|
|||
emit progress(0,1);
|
||||
fetchTabs();
|
||||
} else {
|
||||
qWarning() << "No Dashboards found!";
|
||||
qWarning() << "No Dashboards found";
|
||||
|
||||
// Restoring backup
|
||||
auto db = DatabaseManager::instance();
|
||||
if (!db->restoreBackup()) {
|
||||
qWarning() << "Unable to restore DB backup!";
|
||||
qWarning() << "Unable to restore DB backup";
|
||||
}
|
||||
|
||||
taskEnd();
|
||||
|
|
@ -861,7 +861,7 @@ void NvFetcher::finishedTabs()
|
|||
// Restoring backup
|
||||
auto db = DatabaseManager::instance();
|
||||
if (!db->restoreBackup()) {
|
||||
qWarning() << "Unable to restore DB backup!";
|
||||
qWarning() << "Unable to restore DB backup";
|
||||
}
|
||||
|
||||
emit error(500);
|
||||
|
|
@ -880,10 +880,10 @@ void NvFetcher::finishedTabs2()
|
|||
fetchTabs();
|
||||
} else {
|
||||
if (tabList.isEmpty()) {
|
||||
qWarning() << "No Tabs!";
|
||||
qWarning() << "No Tabs";
|
||||
}
|
||||
if (streamList.isEmpty()) {
|
||||
qWarning() << "No Streams!";
|
||||
qWarning() << "No Streams";
|
||||
taskEnd();
|
||||
} else {
|
||||
if (busyType == Fetcher::Updating) {
|
||||
|
|
@ -898,7 +898,7 @@ void NvFetcher::finishedTabs2()
|
|||
db->cleanStreams();
|
||||
|
||||
if (streamList.isEmpty()) {
|
||||
qDebug() << "No new Feeds!";
|
||||
qDebug() << "No new Feeds";
|
||||
proggressTotal = qCeil(streamUpdateList.count()/feedsUpdateAtOnce)+3;
|
||||
emit progress(3,proggressTotal);
|
||||
fetchFeedsUpdate();
|
||||
|
|
@ -930,7 +930,7 @@ void NvFetcher::finishedFeeds()
|
|||
// Restoring backup
|
||||
auto db = DatabaseManager::instance();
|
||||
if (!db->restoreBackup()) {
|
||||
qWarning() << "Unable to restore DB backup!";
|
||||
qWarning() << "Unable to restore DB backup";
|
||||
}
|
||||
|
||||
emit error(500);
|
||||
|
|
@ -971,7 +971,7 @@ void NvFetcher::finishedFeedsReadlater()
|
|||
// Restoring backup
|
||||
auto db = DatabaseManager::instance();
|
||||
if (!db->restoreBackup()) {
|
||||
qWarning() << "Unable to restore DB backup!";
|
||||
qWarning() << "Unable to restore DB backup";
|
||||
}
|
||||
|
||||
emit error(500);
|
||||
|
|
@ -1012,7 +1012,7 @@ void NvFetcher::finishedFeedsUpdate()
|
|||
// Restoring backup
|
||||
auto db = DatabaseManager::instance();
|
||||
if (!db->restoreBackup()) {
|
||||
qWarning() << "Unable to restore DB backup!";
|
||||
qWarning() << "Unable to restore DB backup";
|
||||
}
|
||||
|
||||
emit error(500);
|
||||
|
|
@ -1052,14 +1052,14 @@ void NvFetcher::finishedSetAction()
|
|||
return;
|
||||
}
|
||||
|
||||
qWarning() << "Unknown error in setAction reply!";
|
||||
qWarning() << "Unknown error in setAction reply";
|
||||
|
||||
//emit error(500);
|
||||
//setBusy(false);
|
||||
//return;
|
||||
|
||||
} else if (!parse()) {
|
||||
qWarning() << "Error parsing Json!";
|
||||
qWarning() << "Error parsing Json";
|
||||
emit error(600);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -1105,7 +1105,7 @@ void NvFetcher::run()
|
|||
publishedBeforeDate = 0;
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Unknown Job!";
|
||||
qWarning() << "Unknown Job";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1129,7 +1129,7 @@ void NvFetcher::startJob(Job job)
|
|||
|
||||
// If credentials other than Netvibes, prompting for re-auth
|
||||
if (s->getSigninType()>0) {
|
||||
qWarning() << "Cookie expires!";
|
||||
qWarning() << "Cookie expires";
|
||||
s->setCookie("");
|
||||
setBusy(false);
|
||||
emit error(403);
|
||||
|
|
@ -1140,7 +1140,7 @@ void NvFetcher::startJob(Job job)
|
|||
|
||||
// Restoring backup
|
||||
if (!db->restoreBackup()) {
|
||||
qWarning() << "Unable to restore DB backup!";
|
||||
qWarning() << "Unable to restore DB backup";
|
||||
}
|
||||
|
||||
setBusy(false);
|
||||
|
|
@ -1149,11 +1149,11 @@ void NvFetcher::startJob(Job job)
|
|||
return;
|
||||
}
|
||||
} else {
|
||||
qWarning() << "Error parsing Json!";
|
||||
qWarning() << "Error parsing Json";
|
||||
|
||||
// Restoring backup
|
||||
if (!db->restoreBackup()) {
|
||||
qWarning() << "Unable to restore DB backup!";
|
||||
qWarning() << "Unable to restore DB backup";
|
||||
}
|
||||
|
||||
emit error(600);
|
||||
|
|
@ -1181,7 +1181,7 @@ void NvFetcher::startJob(Job job)
|
|||
connect(this, SIGNAL(finished()), this, SLOT(finishedFeedsReadlater2()));
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Unknown Job!";
|
||||
qWarning() << "Unknown Job";
|
||||
emit error(502);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -1282,7 +1282,7 @@ void NvFetcher::storeDashboards()
|
|||
}
|
||||
|
||||
} else {
|
||||
qWarning() << "No dashboards element found!";
|
||||
qWarning() << "No dashboards element found";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1349,7 +1349,7 @@ void NvFetcher::storeTabs()
|
|||
}
|
||||
}
|
||||
} else {
|
||||
qWarning() << "No \"tabs\" element found!";
|
||||
qWarning() << "No \"tabs\" element found";
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
|
|
@ -1404,14 +1404,14 @@ void NvFetcher::storeTabs()
|
|||
//qDebug() << "Writing module: " << "tabid:" << smt.tabId << "moduleId:" << smt.moduleId << "streamId:" << smt.streamId << m.title;
|
||||
}
|
||||
} else {
|
||||
qWarning() << "Module"<<m.id<<"without streams!";
|
||||
qWarning() << "Module"<<m.id<<"without streams";
|
||||
}
|
||||
|
||||
db->writeModule(m);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
qWarning() << "No modules element found!";
|
||||
qWarning() << "No modules element found";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1454,7 +1454,7 @@ int NvFetcher::storeFeeds()
|
|||
if (obj["error"].isObject()) {
|
||||
int code = (int) obj["error"].toObject()["code"].toDouble();
|
||||
if (code != 204) {
|
||||
qWarning() << "Nested error in Netvibes response!" <<
|
||||
qWarning() << "Nested error in Netvibes response:" <<
|
||||
"Code:" << code << "Message:" <<
|
||||
obj["error"].toObject()["message"].toString();
|
||||
//qWarning() << "JSON obj:" << obj;
|
||||
|
|
@ -1464,7 +1464,7 @@ int NvFetcher::storeFeeds()
|
|||
#else
|
||||
QVariantMap obj = (*ai).toMap();
|
||||
if (obj["error"].type()==QVariant::Map) {
|
||||
qWarning() << "Nested error in Netvibes response!";
|
||||
qWarning() << "Nested error in Netvibes response";
|
||||
qWarning() << "Code:" << (int) obj["error"].toMap()["code"].toDouble();
|
||||
qWarning() << "Message:" << obj["error"].toMap()["message"].toString();
|
||||
qWarning() << "JSON obj:" << obj;
|
||||
|
|
@ -1506,7 +1506,7 @@ int NvFetcher::storeFeeds()
|
|||
db->writeStream(st);
|
||||
}
|
||||
} else {
|
||||
qWarning() << "No \"streams\" element found!";
|
||||
qWarning() << "No \"streams\" element found";
|
||||
}
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
if (arr.at(i).toObject()["items"].isArray()) {
|
||||
|
|
@ -1647,12 +1647,12 @@ int NvFetcher::storeFeeds()
|
|||
publishedBeforeDate = e.publishedAt;
|
||||
}
|
||||
} else {
|
||||
qWarning() << "No \"items\" element found!";
|
||||
qWarning() << "No \"items\" element found";
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
qWarning() << "No \"relults\" element found!";
|
||||
qWarning() << "No \"relults\" element found";
|
||||
}
|
||||
|
||||
return entriesCount;
|
||||
|
|
@ -1662,12 +1662,12 @@ bool NvFetcher::checkError()
|
|||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
if(jsonObj["error"].isObject()) {
|
||||
qWarning() << "Error in Netvibes response!";
|
||||
qWarning() << "Error in Netvibes response";
|
||||
qWarning() << "Code:" << (int) jsonObj["error"].toObject()["code"].toDouble();
|
||||
qWarning() << "Message:" << jsonObj["error"].toObject()["message"].toString();
|
||||
#else
|
||||
if (jsonObj["error"].type()==QVariant::Map) {
|
||||
qWarning() << "Error in Netvibes response!";
|
||||
qWarning() << "Error in Netvibes response";
|
||||
qWarning() << "Code:" << (int) jsonObj["error"].toMap()["code"].toDouble();
|
||||
qWarning() << "Message:" << jsonObj["error"].toMap()["message"].toString();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ void OldReaderFetcher::signIn()
|
|||
switch (type) {
|
||||
case 10:
|
||||
if (password.isEmpty() || username.isEmpty()) {
|
||||
qWarning() << "Username & password do not match!";
|
||||
qWarning() << "Username & password do not match";
|
||||
if (busyType == Fetcher::CheckingCredentials)
|
||||
emit errorCheckingCredentials(400);
|
||||
else
|
||||
|
|
@ -87,7 +87,7 @@ void OldReaderFetcher::signIn()
|
|||
currentReply = nam.post(request,body.toUtf8());
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Invalid sign in type!";
|
||||
qWarning() << "Invalid sign in type";
|
||||
emit error(500);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -528,7 +528,7 @@ void OldReaderFetcher::finishedSignInOnlyCheck()
|
|||
return;
|
||||
}
|
||||
|
||||
qWarning() << "Sign in failed!";
|
||||
qWarning() << "Sign in failed";
|
||||
emit errorCheckingCredentials(501);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -557,7 +557,7 @@ void OldReaderFetcher::finishedSignInOnlyCheck()
|
|||
}
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Invalid sign in type!";
|
||||
qWarning() << "Invalid sign in type";
|
||||
emit errorCheckingCredentials(502);
|
||||
setBusy(false);
|
||||
s->setSignedIn(false);
|
||||
|
|
@ -580,7 +580,7 @@ void OldReaderFetcher::finishedSignIn()
|
|||
return;
|
||||
}
|
||||
|
||||
qWarning() << "Sign in failed!";
|
||||
qWarning() << "Sign in failed";
|
||||
emit error(501);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -608,7 +608,7 @@ void OldReaderFetcher::finishedSignIn()
|
|||
}
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Invalid sign in type!";
|
||||
qWarning() << "Invalid sign in type";
|
||||
emit error(502);
|
||||
setBusy(false);
|
||||
s->setSignedIn(false);
|
||||
|
|
@ -637,7 +637,7 @@ void OldReaderFetcher::finishedTabs2()
|
|||
continuationCount = 0;
|
||||
|
||||
if (tabList.isEmpty()) {
|
||||
qWarning() << "No Tabs to download!";
|
||||
qWarning() << "No Tabs to download";
|
||||
if (busyType == Fetcher::Initiating)
|
||||
db->cleanEntries();
|
||||
|
||||
|
|
@ -863,7 +863,7 @@ void OldReaderFetcher::finishedSetAction()
|
|||
int code = currentReply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
||||
if (code == 404) {
|
||||
// Probably item already deleted -> skiping
|
||||
qWarning() << "Action request returns 404!";
|
||||
qWarning() << "Action request returns 404";
|
||||
} else {
|
||||
emit error(500);
|
||||
setBusy(false);
|
||||
|
|
@ -909,7 +909,7 @@ void OldReaderFetcher::getConnectUrl(int type)
|
|||
{
|
||||
Q_UNUSED(type)
|
||||
if (busy) {
|
||||
qWarning() << "Fetcher is busy!";
|
||||
qWarning() << "Fetcher is busy";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -956,7 +956,7 @@ void OldReaderFetcher::startJob(Job job)
|
|||
currentJob = job;
|
||||
|
||||
if (parse()) {
|
||||
/*qWarning() << "Cookie expires!";
|
||||
/*qWarning() << "Cookie expires";
|
||||
Settings *s = Settings::instance();
|
||||
s->setCookie("");
|
||||
setBusy(false);
|
||||
|
|
@ -970,7 +970,7 @@ void OldReaderFetcher::startJob(Job job)
|
|||
update();
|
||||
return;*/
|
||||
} else {
|
||||
qWarning() << "Error parsing Json!";
|
||||
qWarning() << "Error parsing Json";
|
||||
emit error(600);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -1005,7 +1005,7 @@ void OldReaderFetcher::startJob(Job job)
|
|||
connect(this, SIGNAL(finished()), this, SLOT(finishedMarkSlow()));
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Unknown Job!";
|
||||
qWarning() << "Unknown Job";
|
||||
emit error(502);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -1037,7 +1037,7 @@ void OldReaderFetcher::run()
|
|||
markSlowFeeds();
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Unknown Job!";
|
||||
qWarning() << "Unknown Job";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1086,7 +1086,7 @@ void OldReaderFetcher::storeTabs()
|
|||
}
|
||||
|
||||
} else {
|
||||
qWarning() << "No \"tabs\" element found!";
|
||||
qWarning() << "No \"tabs\" element found";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1257,7 +1257,7 @@ void OldReaderFetcher::storeFriends()
|
|||
}
|
||||
|
||||
} else {
|
||||
qWarning() << "No \"friends\" element found!";
|
||||
qWarning() << "No \"friends\" element found";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1345,7 +1345,7 @@ void OldReaderFetcher::storeFeeds()
|
|||
}
|
||||
|
||||
} else {
|
||||
qWarning() << "No \"tabs\" element found!";
|
||||
qWarning() << "No \"tabs\" element found";
|
||||
}
|
||||
|
||||
if (!subscriptionsFolderFeed) {
|
||||
|
|
@ -1371,7 +1371,7 @@ void OldReaderFetcher::storeStream()
|
|||
if (jsonObj["updated"].isDouble()) {
|
||||
updated = jsonObj["updated"].toDouble();
|
||||
} else {
|
||||
qWarning() << "No updated param in stream!";
|
||||
qWarning() << "No updated param in stream";
|
||||
}
|
||||
if (jsonObj["items"].isArray()) {
|
||||
QJsonArray arr = jsonObj["items"].toArray();
|
||||
|
|
@ -1381,7 +1381,7 @@ void OldReaderFetcher::storeStream()
|
|||
if (jsonObj["updated"].type()==QVariant::ULongLong) {
|
||||
updated = jsonObj["updated"].toDouble();
|
||||
} else {
|
||||
qWarning() << "No updated param in stream!";
|
||||
qWarning() << "No updated param in stream";
|
||||
}
|
||||
if (jsonObj["items"].type()==QVariant::List) {
|
||||
QVariantList::const_iterator i = jsonObj["items"].toList().constBegin();
|
||||
|
|
|
|||
|
|
@ -672,7 +672,7 @@ QString Settings::getSettingsDir()
|
|||
|
||||
if (!QDir(value).exists()) {
|
||||
if (!QDir::root().mkpath(value)) {
|
||||
qWarning() << "Unable to create settings dir!";
|
||||
qWarning() << "Unable to create settings dir";
|
||||
emit error(501);
|
||||
}
|
||||
}
|
||||
|
|
@ -728,7 +728,7 @@ QString Settings::getDmCacheDir()
|
|||
|
||||
if (!QDir(value).exists()) {
|
||||
if (!QDir::root().mkpath(value)) {
|
||||
qWarning() << "Unable to create cache dir!";
|
||||
qWarning() << "Unable to create cache dir";
|
||||
emit error(502);
|
||||
}
|
||||
}
|
||||
|
|
@ -925,6 +925,7 @@ void Settings::reset()
|
|||
setProvider("");
|
||||
setUserId("");
|
||||
setShowBroadcast(true);
|
||||
setIgnoreSslErrors(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ void TabModel::markAsUnread(int row)
|
|||
|
||||
if (s->getSigninType() >= 10) {
|
||||
// markAsUnread not supported in API
|
||||
qWarning() << "Mark tab as unread is not supported!";
|
||||
qWarning() << "Mark tab as unread is not supported";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ void TabModel::setAllAsUnread()
|
|||
|
||||
if (s->getSigninType() >= 10) {
|
||||
// setAllAsUnread not supported in API
|
||||
qWarning() << "Mark all as unread is not supported!";
|
||||
qWarning() << "Mark all as unread is not supported";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void TTRssFetcher::signIn()
|
|||
case 30:
|
||||
{
|
||||
if (password == "" || username == "" || url == "") {
|
||||
qWarning() << "TTRss credentials are invalid!";
|
||||
qWarning() << "TTRss credentials are invalid";
|
||||
if (busyType == Fetcher::CheckingCredentials)
|
||||
emit errorCheckingCredentials(400);
|
||||
else
|
||||
|
|
@ -87,7 +87,7 @@ void TTRssFetcher::signIn()
|
|||
break;
|
||||
}
|
||||
default:
|
||||
qWarning() << "Invalid sign in type!";
|
||||
qWarning() << "Invalid sign in type";
|
||||
emit error(500);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -141,7 +141,7 @@ void TTRssFetcher::startFetching()
|
|||
auto db = DatabaseManager::instance();
|
||||
|
||||
if (!db->makeBackup ()) {
|
||||
qWarning() << "Unable to make DB backup!";
|
||||
qWarning() << "Unable to make DB backup";
|
||||
emit error(506);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -288,7 +288,7 @@ void TTRssFetcher::startJob(Job job)
|
|||
connect(this, SIGNAL(finished()), this, SLOT(finishedStream2()));
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Unknown Job!";
|
||||
qWarning() << "Unknown Job";
|
||||
emit error(502);
|
||||
setBusy(false);
|
||||
return;
|
||||
|
|
@ -310,7 +310,7 @@ void TTRssFetcher::run()
|
|||
storeStream();
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Unknown Job!";
|
||||
qWarning() << "Unknown Job";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -344,7 +344,7 @@ void TTRssFetcher::storeCategories()
|
|||
}
|
||||
}
|
||||
} else {
|
||||
qWarning() << "No categories found!";
|
||||
qWarning() << "No categories found";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -405,7 +405,7 @@ void TTRssFetcher::storeFeeds()
|
|||
db->writeModule(m);
|
||||
}
|
||||
} else {
|
||||
qWarning() << "No feeds found!";
|
||||
qWarning() << "No feeds found";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -743,7 +743,7 @@ bool TTRssFetcher::processResponse()
|
|||
}
|
||||
|
||||
if (!parse()) {
|
||||
qWarning() << "Error parsing Json!";
|
||||
qWarning() << "Error parsing Json";
|
||||
emit error(600);
|
||||
setBusy(false);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -703,64 +703,21 @@ QString Utils::getHumanFriendlyTimeString(int date)
|
|||
if (secs<=0) {
|
||||
return tr("just now");
|
||||
}
|
||||
if (secs==1) {
|
||||
return tr("1 second ago");
|
||||
}
|
||||
if (secs<5) {
|
||||
return tr("%1 seconds ago","less than 5 seconds").arg(secs);
|
||||
}
|
||||
if (secs<60) {
|
||||
return tr("%1 seconds ago","more or equal 5 seconds").arg(secs);
|
||||
return tr("%n second(s) ago", "", secs);
|
||||
}
|
||||
if (secs<120) {
|
||||
return tr("1 minute ago");
|
||||
}
|
||||
if (secs<300) {
|
||||
return tr("%1 minutes ago","less than 5 minutes").arg(qFloor(secs/60));
|
||||
}
|
||||
if (secs<3600) {
|
||||
return tr("%1 minutes ago","more or equal 5 minutes").arg(qFloor(secs/60));
|
||||
return tr("%n minute(s) ago", "", qFloor(secs/60));
|
||||
}
|
||||
if (secs<7200) {
|
||||
return tr("1 hour ago");
|
||||
}
|
||||
if (secs<18000) {
|
||||
return tr("%1 hours ago","less than 5 hours").arg(qFloor(secs/3600));
|
||||
}
|
||||
if (secs<86400) {
|
||||
return tr("%1 hours ago","more or equal 5 hours").arg(qFloor(secs/3600));
|
||||
return tr("%n hour(s) ago", "", qFloor(secs/3600));
|
||||
}
|
||||
|
||||
int days = qdate.daysTo(QDateTime::currentDateTimeUtc());
|
||||
|
||||
if (days==1) {
|
||||
return tr("day ago");
|
||||
}
|
||||
if (days<5) {
|
||||
return tr("%1 days ago","less than 5 days").arg(days);
|
||||
}
|
||||
if (days<8) {
|
||||
return tr("%1 days ago","more or equal 5 days").arg(days);
|
||||
return tr("%n day(s) ago", "", days);
|
||||
}
|
||||
/*if (days<8) {
|
||||
return tr("1 week ago");
|
||||
}
|
||||
if (days<29) {
|
||||
return tr("%1 weeks ago").arg(qFloor(days/7));
|
||||
}
|
||||
|
||||
int months = Utils::monthsTo(qdate.date(),QDate::currentDate());
|
||||
|
||||
if (months==1) {
|
||||
return tr("1 month ago");
|
||||
}
|
||||
|
||||
if (months<5) {
|
||||
return tr("%1 months ago","less than 5 months").arg(months);
|
||||
}
|
||||
if (days<13) {
|
||||
return tr("%1 months ago","more or equal 5 months").arg(months);
|
||||
}*/
|
||||
|
||||
return qdate.toString("dddd, d MMMM yy");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue