some minor UX tweaks for feed/category dialogs

This commit is contained in:
Martin Rotter 2022-03-07 09:04:59 +01:00
parent 84aa24255c
commit 2100573a14
4 changed files with 8 additions and 2 deletions

View File

@ -26,7 +26,7 @@
<url type="donation">https://github.com/sponsors/martinrotter</url>
<content_rating type="oars-1.1" />
<releases>
<release version="4.1.2" date="2022-03-04"/>
<release version="4.1.2" date="2022-03-07"/>
</releases>
<content_rating type="oars-1.0">
<content_attribute id="violence-cartoon">none</content_attribute>

View File

@ -1940,7 +1940,7 @@ void DatabaseQueries::createOverwriteCategory(const QSqlDatabase& db, Category*
if (category->id() <= 0) {
// We need to insert category first.
if (category->sortOrder() < 0) {
q.exec(QSL("SELECT MAX(ordr) FROM Categories WHERE account_id = :account_id AND parent_id = :parent_id;"));
q.prepare(QSL("SELECT MAX(ordr) FROM Categories WHERE account_id = :account_id AND parent_id = :parent_id;"));
q.bindValue(QSL(":account_id"), account_id);
q.bindValue(QSL(":parent_id"), parent_id);

View File

@ -88,6 +88,8 @@ void FormCategoryDetails::loadCategoryData() {
m_ui->m_txtTitle->lineEdit()->setText(m_category->title());
m_ui->m_txtDescription->lineEdit()->setText(m_category->description());
m_ui->m_btnIcon->setIcon(m_category->icon());
m_ui->m_txtTitle->lineEdit()->setFocus();
}
void FormCategoryDetails::apply() {

View File

@ -21,6 +21,9 @@
StandardFeedDetails::StandardFeedDetails(QWidget* parent) : QWidget(parent) {
m_ui.setupUi(this);
m_ui.m_txtPostProcessScript->textEdit()->setTabChangesFocus(true);
m_ui.m_txtSource->textEdit()->setTabChangesFocus(true);
m_ui.m_txtTitle->lineEdit()->setPlaceholderText(tr("Feed title"));
m_ui.m_txtTitle->lineEdit()->setToolTip(tr("Set title for your feed."));
m_ui.m_txtDescription->lineEdit()->setPlaceholderText(tr("Feed description"));
@ -334,6 +337,7 @@ void StandardFeedDetails::prepareForNewFeed(RootItem* parent_to_select, const QS
}
m_ui.m_txtSource->setFocus();
m_ui.m_txtSource->textEdit()->selectAll();
}
void StandardFeedDetails::setExistingFeed(StandardFeed* feed) {