Removed error report via statusbar, added error reporting via message box.
All checks were successful
the build was successful

This commit is contained in:
tastytea 2018-12-06 15:32:28 +01:00
parent f0e01cd268
commit 540877fb75
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
6 changed files with 52 additions and 55 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.2)
project (whyblocked
VERSION 0.12.1
VERSION 0.12.2
LANGUAGES CXX
)

View File

@ -1,8 +1,8 @@
# Packages
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
set(CPACK_PACKAGE_VERSION_MAJOR ${mastodon-cpp_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${mastodon-cpp_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${mastodon-cpp_VERSION_PATCH})
set(CPACK_PACKAGE_VERSION_MAJOR ${${CMAKE_PROJECT_NAME}_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${${CMAKE_PROJECT_NAME}_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${${CMAKE_PROJECT_NAME}_VERSION_PATCH})
set(CPACK_PACKAGE_VERSION ${whyblocked_VERSION})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Whyblocked reminds you why you blocked someone.")
set(CPACK_PACKAGE_CONTACT "tastytea <tastytea@tastytea.de>")

View File

@ -17,8 +17,6 @@
#include <regex>
#include <array>
#include <QMessageBox>
#include <QDebug>
#include <iostream>
#include <QTranslator>
#include <QLibraryInfo>
#include <QtCore/qmimedata.h>
@ -89,6 +87,8 @@ MainWindow::MainWindow(QMainWindow *parent)
}
populate_tableview();
statusBar()->showMessage(tr("Try dragging an account from your webbrowser "
"into this window."));
}
MainWindow::~MainWindow()
@ -171,8 +171,6 @@ void MainWindow::populate_tableview()
QString::fromStdString(std::get<2>(line)));
}
}
statusBar()->showMessage(tr("Database loaded."));
}
void MainWindow::add_row(const QString &user, const int &blocked,
@ -240,15 +238,14 @@ void MainWindow::remove()
{
const string user = row.data().toString().toStdString();
database::remove(user);
statusBar()->showMessage(tr("Removed %1 from database.")
.arg(QString::fromStdString(user)));
_model->removeRow(row.row());
}
label_receipts->clear();
}
else
{
statusBar()->showMessage(tr("Select data to remove."));
QMessageBox::warning(this, tr("Nothing selected"),
tr("Please select entries to remove."));
}
}
@ -410,9 +407,6 @@ void DialogAdd::accept()
database::add_receipt(data.user, receipt);
}
_parent->statusBar()->showMessage(tr("Added %1 to database.")
.arg(QString::fromStdString(data.user)));
delete this;
}

View File

@ -167,6 +167,9 @@
</item>
<item row="4" column="1" rowspan="3">
<widget class="QListWidget" name="list_receipts">
<property name="toolTip">
<string>You can drag URLs in here</string>
</property>
<property name="editTriggers">
<set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
</property>

View File

@ -69,14 +69,14 @@
<translation></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="378"/>
<source>Insert receipt here.</source>
<translation>Beleg hier einfügen.</translation>
<location filename="../src/whyblocked_add.ui" line="171"/>
<source>You can drag URLs in here</source>
<translation type="unfinished">Du kannst URLs hier hineinziehen</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="413"/>
<source>Added %1 to database.</source>
<translation>%1 zur Datenbank hinzugefügt.</translation>
<location filename="../src/interface_qt.cpp" line="375"/>
<source>Insert receipt here.</source>
<translation>Beleg hier einfügen.</translation>
</message>
</context>
<context>
@ -188,7 +188,7 @@
</message>
<message>
<location filename="../src/whyblocked.ui" line="229"/>
<location filename="../src/interface_qt.cpp" line="211"/>
<location filename="../src/interface_qt.cpp" line="209"/>
<source>Edit entry</source>
<translation>Eintrag bearbeiten</translation>
</message>
@ -208,52 +208,52 @@
<translation>Begründung</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="175"/>
<source>Database loaded.</source>
<translation>Datenbank geladen.</translation>
<location filename="../src/interface_qt.cpp" line="90"/>
<source>Try dragging an account from your webbrowser into this window.</source>
<translation>Versuche, einen account von deinem webbrowser in dieses fenster zu ziehen.</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="185"/>
<location filename="../src/interface_qt.cpp" line="183"/>
<source>blocked</source>
<translation>blockiert</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="189"/>
<location filename="../src/interface_qt.cpp" line="187"/>
<source>silenced</source>
<translation>gedämpft</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="205"/>
<location filename="../src/interface_qt.cpp" line="203"/>
<source>Invalid selection</source>
<translation>Ungültige Auswahl</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="206"/>
<location filename="../src/interface_qt.cpp" line="204"/>
<source>Please select only 1 entry to edit.</source>
<translation>Bitte nur 1 Eintrag zum bearbeiten auswählen.</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="243"/>
<source>Removed %1 from database.</source>
<translation>%1 aus der Datenbank gelöscht.</translation>
<location filename="../src/interface_qt.cpp" line="247"/>
<source>Nothing selected</source>
<translation>Nichts ausgewählt</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="251"/>
<source>Select data to remove.</source>
<translation>Wähle Daten zum löschen aus.</translation>
<location filename="../src/interface_qt.cpp" line="248"/>
<source>Please select entries to remove.</source>
<translation>Bitte wähle einträge aus, die gelöscht werden sollen.</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="257"/>
<location filename="../src/interface_qt.cpp" line="254"/>
<source>About Whyblocked</source>
<translation>Über Whyblocked</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="258"/>
<location filename="../src/interface_qt.cpp" line="255"/>
<source>&lt;p&gt;&lt;b&gt;Whyblocked&lt;/b&gt; %1&lt;/p&gt;&lt;p&gt;Reminds you why you blocked someone.&lt;/p&gt;&lt;p&gt;Sourcecode: &lt;a href=&quot;https://schlomp.space/tastytea/whyblocked&quot;&gt;https://schlomp.space/tastytea/whyblocked&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;Copyright © 2018 &lt;a href=&quot;mailto:tastytea@tastytea.de&quot;&gt;tastytea&lt;/a&gt;.&lt;br&gt;Licence GPLv3: &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html&quot;&gt;GNU GPL version 3&lt;/a&gt;.&lt;br&gt;This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.&lt;/small&gt;&lt;/p&gt;</source>
<translation>&lt;p&gt;&lt;b&gt;Whyblocked&lt;/b&gt; %1&lt;/p&gt;&lt;p&gt;Erinnert dich, warum du jemanden blockiertest.&lt;/p&gt;&lt;p&gt;Quelltext: &lt;a href=&quot;https://schlomp.space/tastytea/whyblocked&quot;&gt;https://schlomp.space/tastytea/whyblocked&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;Copyright © 2018 &lt;a href=&quot;mailto:tastytea@tastytea.de&quot;&gt;tastytea&lt;/a&gt;.&lt;br&gt;Lizenz GPLv3: &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html&quot;&gt;GNU GPL version 3&lt;/a&gt;.&lt;br&gt;Für dieses Programm besteht KEINERLEI GARANTIE. Dies ist freie Software, die Sie unter bestimmten Bedingungen weitergeben dürfen.&lt;/small&gt;&lt;/p&gt;</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="281"/>
<location filename="../src/interface_qt.cpp" line="278"/>
<source>Receipts:</source>
<translation>Belege:</translation>
</message>

View File

@ -69,13 +69,13 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="378"/>
<source>Insert receipt here.</source>
<location filename="../src/whyblocked_add.ui" line="171"/>
<source>You can drag URLs in here</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="413"/>
<source>Added %1 to database.</source>
<location filename="../src/interface_qt.cpp" line="375"/>
<source>Insert receipt here.</source>
<translation type="unfinished"></translation>
</message>
</context>
@ -188,7 +188,7 @@
</message>
<message>
<location filename="../src/whyblocked.ui" line="229"/>
<location filename="../src/interface_qt.cpp" line="211"/>
<location filename="../src/interface_qt.cpp" line="209"/>
<source>Edit entry</source>
<translation type="unfinished"></translation>
</message>
@ -208,52 +208,52 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="175"/>
<source>Database loaded.</source>
<location filename="../src/interface_qt.cpp" line="90"/>
<source>Try dragging an account from your webbrowser into this window.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="185"/>
<location filename="../src/interface_qt.cpp" line="183"/>
<source>blocked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="189"/>
<location filename="../src/interface_qt.cpp" line="187"/>
<source>silenced</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="205"/>
<location filename="../src/interface_qt.cpp" line="203"/>
<source>Invalid selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="206"/>
<location filename="../src/interface_qt.cpp" line="204"/>
<source>Please select only 1 entry to edit.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="243"/>
<source>Removed %1 from database.</source>
<location filename="../src/interface_qt.cpp" line="247"/>
<source>Nothing selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="251"/>
<source>Select data to remove.</source>
<location filename="../src/interface_qt.cpp" line="248"/>
<source>Please select entries to remove.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="257"/>
<location filename="../src/interface_qt.cpp" line="254"/>
<source>About Whyblocked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="258"/>
<location filename="../src/interface_qt.cpp" line="255"/>
<source>&lt;p&gt;&lt;b&gt;Whyblocked&lt;/b&gt; %1&lt;/p&gt;&lt;p&gt;Reminds you why you blocked someone.&lt;/p&gt;&lt;p&gt;Sourcecode: &lt;a href=&quot;https://schlomp.space/tastytea/whyblocked&quot;&gt;https://schlomp.space/tastytea/whyblocked&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;Copyright © 2018 &lt;a href=&quot;mailto:tastytea@tastytea.de&quot;&gt;tastytea&lt;/a&gt;.&lt;br&gt;Licence GPLv3: &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html&quot;&gt;GNU GPL version 3&lt;/a&gt;.&lt;br&gt;This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.&lt;/small&gt;&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="281"/>
<location filename="../src/interface_qt.cpp" line="278"/>
<source>Receipts:</source>
<translation type="unfinished"></translation>
</message>