Add SQL structures for unread msg fetching for nextcloud.

This commit is contained in:
Martin Rotter 2020-06-12 13:20:57 +02:00
parent 53cd34eaa2
commit c7bad4d61b
36 changed files with 155 additions and 45 deletions

View File

@ -636,6 +636,10 @@ or this functionality is not implemented yet.</source>
<source>Context menu for accounts</source>
<translation>Kontextové menu pro účty</translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -630,6 +630,10 @@ or this functionality is not implemented yet.</source>
<source>Context menu for accounts</source>
<translation>Genvejsmenu for konti</translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -632,6 +632,10 @@ or this functionality is not implemented yet.</source>
<source>Context menu for accounts</source>
<translation>Kontextmenü für Benutzerkonten</translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -655,6 +655,10 @@ or this functionality is not implemented yet.</translation>
<source>Context menu for accounts</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -633,6 +633,10 @@ o debido a que esta función aún no está implementada.</translation>
<source>Context menu for accounts</source>
<translation>Menú contextual para las cuentas</translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -633,6 +633,10 @@ ou cette fonctionnalité n&apos;est pas encore implémentée.</translation>
<source>Context menu for accounts</source>
<translation type="unfinished"/>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -631,6 +631,10 @@ or this functionality is not implemented yet.</source>
<source>Context menu for accounts</source>
<translation>Menú contextual para contas</translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -629,6 +629,10 @@ or this functionality is not implemented yet.</source>
<source>Context menu for accounts</source>
<translation type="unfinished"/>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -632,6 +632,10 @@ atau fungsi ini belum diimplementasikan.</translation>
<source>Context menu for accounts</source>
<translation type="unfinished"/>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -633,6 +633,10 @@ oppure questa funzionalità non è ancora implementata.</translation>
<source>Context menu for accounts</source>
<translation type="unfinished"/>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -629,6 +629,10 @@ or this functionality is not implemented yet.</source>
<source>Context menu for accounts</source>
<translation type="unfinished"/>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -636,6 +636,10 @@ arba šis funkcionalumas dar nėra įgyvendintas.</translation>
<source>Context menu for accounts</source>
<translation>Kontekstinis meniu paskyroms</translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -634,6 +634,10 @@ of omdat deze functie nog niet is geïmplementeerd.</translation>
<source>Context menu for accounts</source>
<translation>Rechtermuisknopmenu van accounts</translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -635,6 +635,10 @@ lub ta funkcja nie jest jeszcze zaimplementowana,</translation>
<source>Context menu for accounts</source>
<translation type="unfinished"/>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -634,6 +634,10 @@ ou esta função ainda não foi implementada.</translation>
<source>Context menu for accounts</source>
<translation>Menu de contexto para contas</translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -635,6 +635,10 @@ or this functionality is not implemented yet.</source>
<source>Context menu for accounts</source>
<translation>Контекстное меню для аккаунтов</translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -634,6 +634,10 @@ att funktionen inte är implementerad än.</translation>
<source>Context menu for accounts</source>
<translation>Kontextmeny för konton</translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -632,6 +632,10 @@ or this functionality is not implemented yet.</source>
<source>Context menu for accounts</source>
<translation>Контекстне меню для облікових записів</translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -632,6 +632,10 @@ or this functionality is not implemented yet.</source>
<source>Context menu for accounts</source>
<translation></translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -633,6 +633,10 @@ or this functionality is not implemented yet.</source>
<source>Context menu for accounts</source>
<translation></translation>
</message>
<message>
<source>Context menu for important messages</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>FormAbout</name>

View File

@ -13,6 +13,7 @@
<file>sql/db_update_mysql_10_11.sql</file>
<file>sql/db_update_mysql_11_12.sql</file>
<file>sql/db_update_mysql_12_13.sql</file>
<file>sql/db_update_mysql_13_14.sql</file>
<file>sql/db_init_sqlite.sql</file>
<file>sql/db_update_sqlite_1_2.sql</file>
@ -27,5 +28,6 @@
<file>sql/db_update_sqlite_10_11.sql</file>
<file>sql/db_update_sqlite_11_12.sql</file>
<file>sql/db_update_sqlite_12_13.sql</file>
<file>sql/db_update_sqlite_13_14.sql</file>
</qresource>
</RCC>

View File

@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS Information (
inf_value TEXT NOT NULL
);
-- !
INSERT INTO Information VALUES (1, 'schema_version', '13');
INSERT INTO Information VALUES (1, 'schema_version', '14');
-- !
CREATE TABLE IF NOT EXISTS Accounts (
id INTEGER PRIMARY KEY,
@ -40,6 +40,7 @@ CREATE TABLE IF NOT EXISTS OwnCloudAccounts (
url TEXT NOT NULL,
force_update INTEGER(1) NOT NULL DEFAULT 0 CHECK (force_update >= 0 AND force_update <= 1),
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
update_only_unread INTEGER(1) NOT NULL DEFAULT 0 CHECK (update_only_unread >= 0 AND update_only_unread <= 1),
FOREIGN KEY (id) REFERENCES Accounts (id)
);

View File

@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS Information (
inf_value TEXT NOT NULL
);
-- !
INSERT INTO Information VALUES (1, 'schema_version', '13');
INSERT INTO Information VALUES (1, 'schema_version', '14');
-- !
CREATE TABLE IF NOT EXISTS Accounts (
id INTEGER PRIMARY KEY,
@ -28,12 +28,13 @@ CREATE TABLE IF NOT EXISTS TtRssAccounts (
);
-- !
CREATE TABLE IF NOT EXISTS OwnCloudAccounts (
id INTEGER,
username TEXT NOT NULL,
password TEXT,
url TEXT NOT NULL,
force_update INTEGER(1) NOT NULL CHECK (force_update >= 0 AND force_update <= 1) DEFAULT 0,
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
id INTEGER,
username TEXT NOT NULL,
password TEXT,
url TEXT NOT NULL,
force_update INTEGER(1) NOT NULL CHECK (force_update >= 0 AND force_update <= 1) DEFAULT 0,
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
update_only_unread INTEGER(1) NOT NULL CHECK (update_only_unread >= 0 AND update_only_unread <= 1) DEFAULT 0,
FOREIGN KEY (id) REFERENCES Accounts (id)
);

View File

@ -0,0 +1,4 @@
ALTER TABLE OwnCloudAccounts
ADD COLUMN update_only_unread INTEGER(1) NOT NULL DEFAULT 0 CHECK (update_only_unread >= 0 AND update_only_unread <= 1);
-- !
UPDATE Information SET inf_value = '14' WHERE inf_key = 'schema_version';

View File

@ -0,0 +1,22 @@
CREATE TABLE backup_ta AS SELECT * FROM OwnCloudAccounts;
-- !
DROP TABLE OwnCloudAccounts;
-- !
CREATE TABLE IF NOT EXISTS OwnCloudAccounts (
id INTEGER,
username TEXT NOT NULL,
password TEXT,
url TEXT NOT NULL,
force_update INTEGER(1) NOT NULL CHECK (force_update >= 0 AND force_update <= 1) DEFAULT 0,
msg_limit INTEGER NOT NULL DEFAULT -1 CHECK (msg_limit >= -1),
update_only_unread INTEGER(1) NOT NULL CHECK (update_only_unread >= 0 AND update_only_unread <= 1) DEFAULT 0,
FOREIGN KEY (id) REFERENCES Accounts (id)
);
-- !
INSERT INTO OwnCloudAccounts (id, username, password, url, force_update, msg_limit, update_only_unread)
SELECT id, username, password, url, force_update, msg_limit, 0 FROM backup_ta;
-- !
DROP TABLE backup_ta;
-- !
UPDATE Information SET inf_value = '14' WHERE inf_key = 'schema_version';

View File

@ -113,7 +113,7 @@
#define APP_DB_SQLITE_FILE "database.db"
// Keep this in sync with schema versions declared in SQL initialization code.
#define APP_DB_SCHEMA_VERSION "13"
#define APP_DB_SCHEMA_VERSION "14"
#define APP_DB_UPDATE_FILE_PATTERN "db_update_%1_%2_%3.sql"
#define APP_DB_COMMENT_SPLIT "-- !\n"
#define APP_DB_NAME_PLACEHOLDER "##"

View File

@ -143,7 +143,7 @@ QString DatabaseFactory::mysqlInterpretErrorCode(MySQLError error_code) const {
default:
//: Unknown MySQL error arised.
return tr("Unknown error.");
return tr("Unknown error: '%1'.").arg(int(error_code));
}
}

View File

@ -623,7 +623,7 @@ int DatabaseQueries::updateMessages(QSqlDatabase db,
}
else {
// We can recognize existing messages via their custom ID.
// NOTE: This concerns messages from custom accounts, like TT-RSS or ownCloud News.
// NOTE: This concerns messages from custom accounts, like TT-RSS or Nextcloud News.
query_select_with_id.bindValue(QSL(":account_id"), account_id);
query_select_with_id.bindValue(QSL(":custom_id"), unnulifyString(message.m_customId));
@ -1119,7 +1119,7 @@ bool DatabaseQueries::overwriteOwnCloudAccount(const QSqlDatabase& db, const QSt
return true;
}
else {
qWarning("ownCloud: Updating account failed: '%s'.", qPrintable(query.lastError().text()));
qWarning("Nextcloud: Updating account failed: '%s'.", qPrintable(query.lastError().text()));
return false;
}
}
@ -1142,7 +1142,7 @@ bool DatabaseQueries::createOwnCloudAccount(const QSqlDatabase& db, int id_to_as
return true;
}
else {
qWarning("ownCloud: Inserting of new account failed: '%s'.", qPrintable(q.lastError().text()));
qWarning("Nextcloud: Inserting of new account failed: '%s'.", qPrintable(q.lastError().text()));
return false;
}
}
@ -1193,7 +1193,7 @@ Assignment DatabaseQueries::getOwnCloudFeeds(const QSqlDatabase& db, int account
q.bindValue(QSL(":account_id"), account_id);
if (!q.exec()) {
qFatal("ownCloud: Query for obtaining feeds failed. Error message: '%s'.", qPrintable(q.lastError().text()));
qFatal("Nextcloud: Query for obtaining feeds failed. Error message: '%s'.", qPrintable(q.lastError().text()));
if (ok != nullptr) {
*ok = false;

View File

@ -98,7 +98,7 @@ class DatabaseQueries {
const QString& app_id, const QString& app_key, const QString& redirect_url,
const QString& refresh_token, int batch_size);
// ownCloud account.
// Nextcloud account.
static QList<ServiceRoot*> getOwnCloudAccounts(const QSqlDatabase& db, bool* ok = nullptr);
static bool deleteOwnCloudAccount(const QSqlDatabase& db, int account_id);
static bool overwriteOwnCloudAccount(const QSqlDatabase& db, const QString& username, const QString& password,

View File

@ -534,7 +534,7 @@ bool ServiceRoot::onBeforeSwitchMessageImportance(RootItem* selected_item, const
auto cache = dynamic_cast<CacheForServiceRoot*>(this);
if (cache != nullptr) {
// Now, we need to separate the changes because of ownCloud API limitations.
// Now, we need to separate the changes because of Nextcloud API limitations.
QList<Message> mark_starred_msgs;
QList<Message> mark_unstarred_msgs;

View File

@ -94,7 +94,6 @@ QList<Message> GmailNetworkFactory::messages(const QString& stream_id, Feed::Sta
QEventLoop loop;
QString bearer = m_oauth2->bearer().toLocal8Bit();
QString next_page_token;
QList<Message> messages;
if (bearer.isEmpty()) {
@ -126,7 +125,6 @@ QList<Message> GmailNetworkFactory::messages(const QString& stream_id, Feed::Sta
if (downloader.lastOutputError() == QNetworkReply::NetworkError::NoError) {
// We parse this chunk.
QString messages_data = downloader.lastOutputData();
QList<Message> more_messages = decodeLiteMessages(messages_data, stream_id, next_page_token);
QList<Message> full_messages;
@ -166,6 +164,7 @@ void GmailNetworkFactory::markMessagesRead(RootItem::ReadStatus status, const QS
}
QList<QPair<QByteArray, QByteArray>> headers;
headers.append(QPair<QByteArray, QByteArray>(QString(HTTP_HEADERS_AUTHORIZATION).toLocal8Bit(),
m_oauth2->bearer().toLocal8Bit()));
headers.append(QPair<QByteArray, QByteArray>(QString(HTTP_HEADERS_CONTENT_TYPE).toLocal8Bit(),
@ -218,6 +217,7 @@ void GmailNetworkFactory::markMessagesStarred(RootItem::Importance importance, c
}
QList<QPair<QByteArray, QByteArray>> headers;
headers.append(QPair<QByteArray, QByteArray>(QString(HTTP_HEADERS_AUTHORIZATION).toLocal8Bit(),
m_oauth2->bearer().toLocal8Bit()));
headers.append(QPair<QByteArray, QByteArray>(QString(HTTP_HEADERS_CONTENT_TYPE).toLocal8Bit(),
@ -492,7 +492,7 @@ QList<Message> GmailNetworkFactory::decodeLiteMessages(const QString& messages_j
cats.insert(category->customId(), category);
// All categories in ownCloud are top-level.
// All categories in Nextcloud are top-level.
parent->appendChild(category);
}
}

View File

@ -156,6 +156,7 @@ void InoreaderNetworkFactory::markMessagesRead(RootItem::ReadStatus status, cons
}
QList<QPair<QByteArray, QByteArray>> headers;
headers.append(QPair<QByteArray, QByteArray>(QString(HTTP_HEADERS_AUTHORIZATION).toLocal8Bit(),
m_oauth2->bearer().toLocal8Bit()));
@ -224,6 +225,7 @@ void InoreaderNetworkFactory::markMessagesStarred(RootItem::Importance importanc
}
QList<QPair<QByteArray, QByteArray>> headers;
headers.append(QPair<QByteArray, QByteArray>(QString(HTTP_HEADERS_AUTHORIZATION).toLocal8Bit(),
m_oauth2->bearer().toLocal8Bit()));
@ -363,8 +365,8 @@ QList<Message> InoreaderNetworkFactory::decodeMessages(const QString& messages_j
RootItem* InoreaderNetworkFactory::decodeFeedCategoriesData(const QString& categories, const QString& feeds, bool obtain_icons) {
auto* parent = new RootItem();
QJsonArray json = QJsonDocument::fromJson(categories.toUtf8()).object()["tags"].toArray();
QMap<QString, RootItem*> cats;
cats.insert(QString(), parent);
for (const QJsonValue& obj : json) {
@ -380,8 +382,6 @@ RootItem* InoreaderNetworkFactory::decodeFeedCategoriesData(const QString& categ
category->setCustomId(label_id);
cats.insert(category->customId(), category);
// All categories in ownCloud are top-level.
parent->appendChild(category);
}
}

View File

@ -14,14 +14,14 @@ FormEditOwnCloudAccount::FormEditOwnCloudAccount(QWidget* parent)
m_ui->setupUi(this);
m_btnOk = m_ui->m_buttonBox->button(QDialogButtonBox::Ok);
GuiUtilities::applyDialogProperties(*this, qApp->icons()->fromTheme(QSL("owncloud")));
GuiUtilities::applyDialogProperties(*this, qApp->icons()->miscIcon(QSL("nextcloud")));
m_ui->m_lblTestResult->label()->setWordWrap(true);
m_ui->m_lblServerSideUpdateInformation->setText(tr("Leaving this option on causes that updates "
"of feeds will be probably much slower and may time-out often."));
m_ui->m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your ownCloud account"));
m_ui->m_txtUsername->lineEdit()->setPlaceholderText(tr("Username for your ownCloud account"));
m_ui->m_txtUrl->lineEdit()->setPlaceholderText(tr("URL of your ownCloud server, without any API path"));
m_ui->m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your Nextcloud account"));
m_ui->m_txtUsername->lineEdit()->setPlaceholderText(tr("Username for your Nextcloud account"));
m_ui->m_txtUrl->lineEdit()->setPlaceholderText(tr("URL of your Nextcloud server, without any API path"));
m_ui->m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Information,
tr("No test done yet."),
tr("Here, results of connection test are shown."));
@ -70,13 +70,13 @@ FormEditOwnCloudAccount::FormEditOwnCloudAccount(QWidget* parent)
FormEditOwnCloudAccount::~FormEditOwnCloudAccount() = default;
OwnCloudServiceRoot* FormEditOwnCloudAccount::execForCreate() {
setWindowTitle(tr("Add new ownCloud News account"));
setWindowTitle(tr("Add new Nextcloud News account"));
exec();
return m_editableRoot;
}
void FormEditOwnCloudAccount::execForEdit(OwnCloudServiceRoot* existing_root) {
setWindowTitle(tr("Edit existing ownCloud News account"));
setWindowTitle(tr("Edit existing Nextcloud News account"));
m_editableRoot = existing_root;
m_ui->m_txtUsername->lineEdit()->setText(existing_root->network()->authUsername());
@ -106,24 +106,24 @@ void FormEditOwnCloudAccount::performTest() {
if (!SystemFactory::isVersionEqualOrNewer(result.version(), OWNCLOUD_MIN_VERSION)) {
m_ui->m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error,
tr(
"Selected ownCloud News server is running unsupported version (%1). At least version %2 is required.").arg(
"Selected Nextcloud News server is running unsupported version (%1). At least version %2 is required.").arg(
result.version(),
OWNCLOUD_MIN_VERSION),
tr("Selected ownCloud News server is running unsupported version."));
tr("Selected Nextcloud News server is running unsupported version."));
}
else {
m_ui->m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Ok,
tr(
"ownCloud News server is okay, running with version %1, while at least version %2 is required.").arg(
"Nextcloud News server is okay, running with version %1, while at least version %2 is required.").arg(
result.version(),
OWNCLOUD_MIN_VERSION),
tr("ownCloud News server is okay."));
tr("Nextcloud News server is okay."));
}
}
else if (factory.lastError() != QNetworkReply::NoError) {
m_ui->m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error,
tr("Network error: '%1'.").arg(NetworkFactory::networkErrorText(factory.lastError())),
tr("Network error, have you entered correct ownCloud endpoint and password?"));
tr("Network error, have you entered correct Nextcloud endpoint and password?"));
}
else {
m_ui->m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Error,

View File

@ -29,7 +29,7 @@ void FormOwnCloudFeedDetails::apply() {
if (m_ui->m_txtTitle->lineEdit()->text() != m_editableFeed->title()) {
if (!qobject_cast<OwnCloudServiceRoot*>(m_serviceRoot)->network()->renameFeed(m_ui->m_txtTitle->lineEdit()->text(),
m_editableFeed->customId())) {
qWarning("ownCloud: Problem with feed renaming ID '%s'.", qPrintable(m_editableFeed->customId()));
qWarning("Nextcloud: Problem with feed renaming ID '%s'.", qPrintable(m_editableFeed->customId()));
}
else {
renamed = true;

View File

@ -98,7 +98,7 @@ OwnCloudUserResponse OwnCloudNetworkFactory::userInfo() {
OwnCloudUserResponse user_response(QString::fromUtf8(result_raw));
if (network_reply.first != QNetworkReply::NoError) {
qWarning("ownCloud: Obtaining user info failed with error %d.", network_reply.first);
qWarning("Nextcloud: Obtaining user info failed with error %d.", network_reply.first);
}
m_lastError = network_reply.first;
@ -121,7 +121,7 @@ OwnCloudStatusResponse OwnCloudNetworkFactory::status() {
OwnCloudStatusResponse status_response(QString::fromUtf8(result_raw));
if (network_reply.first != QNetworkReply::NoError) {
qWarning("ownCloud: Obtaining status info failed with error %d.", network_reply.first);
qWarning("Nextcloud: Obtaining status info failed with error %d.", network_reply.first);
}
m_lastError = network_reply.first;
@ -143,7 +143,7 @@ OwnCloudGetFeedsCategoriesResponse OwnCloudNetworkFactory::feedsCategories() {
headers);
if (network_reply.first != QNetworkReply::NoError) {
qWarning("ownCloud: Obtaining of categories failed with error %d.", network_reply.first);
qWarning("Nextcloud: Obtaining of categories failed with error %d.", network_reply.first);
m_lastError = network_reply.first;
return OwnCloudGetFeedsCategoriesResponse();
}
@ -159,7 +159,7 @@ OwnCloudGetFeedsCategoriesResponse OwnCloudNetworkFactory::feedsCategories() {
headers);
if (network_reply.first != QNetworkReply::NoError) {
qWarning("ownCloud: Obtaining of feeds failed with error %d.", network_reply.first);
qWarning("Nextcloud: Obtaining of feeds failed with error %d.", network_reply.first);
m_lastError = network_reply.first;
return OwnCloudGetFeedsCategoriesResponse();
}
@ -187,7 +187,7 @@ bool OwnCloudNetworkFactory::deleteFeed(const QString& feed_id) {
m_lastError = network_reply.first;
if (network_reply.first != QNetworkReply::NoError) {
qWarning("ownCloud: Obtaining of categories failed with error %d.", network_reply.first);
qWarning("Nextcloud: Obtaining of categories failed with error %d.", network_reply.first);
return false;
}
else {
@ -218,7 +218,7 @@ bool OwnCloudNetworkFactory::createFeed(const QString& url, int parent_id) {
m_lastError = network_reply.first;
if (network_reply.first != QNetworkReply::NoError) {
qWarning("ownCloud: Creating of category failed with error %d.", network_reply.first);
qWarning("Nextcloud: Creating of category failed with error %d.", network_reply.first);
return false;
}
else {
@ -249,7 +249,7 @@ bool OwnCloudNetworkFactory::renameFeed(const QString& new_name, const QString&
m_lastError = network_reply.first;
if (network_reply.first != QNetworkReply::NoError) {
qWarning("ownCloud: Renaming of feed failed with error %d.", network_reply.first);
qWarning("Nextcloud: Renaming of feed failed with error %d.", network_reply.first);
return false;
}
else {
@ -280,7 +280,7 @@ OwnCloudGetMessagesResponse OwnCloudNetworkFactory::getMessages(int feed_id) {
OwnCloudGetMessagesResponse msgs_response(QString::fromUtf8(result_raw));
if (network_reply.first != QNetworkReply::NoError) {
qWarning("ownCloud: Obtaining messages failed with error %d.", network_reply.first);
qWarning("Nextcloud: Obtaining messages failed with error %d.", network_reply.first);
}
m_lastError = network_reply.first;
@ -317,7 +317,7 @@ QNetworkReply::NetworkError OwnCloudNetworkFactory::triggerFeedUpdate(int feed_i
headers);
if (network_reply.first != QNetworkReply::NoError) {
qWarning("ownCloud: Feeds update failed with error %d.", network_reply.first);
qWarning("Nextcloud: Feeds update failed with error %d.", network_reply.first);
}
return (m_lastError = network_reply.first);
@ -537,7 +537,7 @@ RootItem* OwnCloudGetFeedsCategoriesResponse::feedsCategories(bool obtain_icons)
category->setCustomId(QString::number(item["id"].toInt()));
cats.insert(category->customId(), category);
// All categories in ownCloud are top-level.
// All categories in Nextcloud are top-level.
parent->appendChild(category);
}

View File

@ -14,7 +14,7 @@ FormEditTtRssAccount::FormEditTtRssAccount(QWidget* parent)
m_ui->setupUi(this);
m_btnOk = m_ui->m_buttonBox->button(QDialogButtonBox::Ok);
GuiUtilities::applyDialogProperties(*this, qApp->icons()->fromTheme(QSL("tinytinyrss")));
GuiUtilities::applyDialogProperties(*this, qApp->icons()->miscIcon(QSL("tt-rss")));
m_ui->m_lblTestResult->label()->setWordWrap(true);
m_ui->m_lblServerSideUpdateInformation->setText(tr("Leaving this option on causes that updates "