Shared namespace refactoring, enum class refactoring, going offline related crash fix

This commit is contained in:
Blue 2020-04-04 01:28:15 +03:00
parent b309100f99
commit ddfb3419cc
59 changed files with 1948 additions and 1695 deletions

View file

@ -16,12 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "message.h"
#include <QDebug>
#include <QMimeDatabase>
#include <QPixmap>
#include <QFileInfo>
#include <QRegularExpression>
#include "message.h"
const QRegularExpression urlReg("(?<!<a\\shref=['\"])(?<!<img\\ssrc=['\"])("
"(?:https?|ftp):\\/\\/"
@ -346,7 +346,7 @@ void Message::setState()
{
Shared::Message::State state = msg.getState();
QIcon q(Shared::icon(Shared::messageStateThemeIcons[static_cast<uint8_t>(state)]));
QString tt = QCoreApplication::translate("Global", Shared::messageStateNames[static_cast<uint8_t>(state)].toLatin1());
QString tt = Shared::Global::getName(state);
if (state == Shared::Message::State::error) {
QString errText = msg.getErrorText();
if (errText.size() > 0) {

View file

@ -31,7 +31,9 @@
#include <QUrl>
#include <QMap>
#include "global.h"
#include "shared/message.h"
#include "shared/icons.h"
#include "shared/global.h"
#include "resizer.h"
#include "image.h"

View file

@ -18,6 +18,7 @@
#include "messageline.h"
#include <QDebug>
#include <QCoreApplication>
#include <cmath>
MessageLine::MessageLine(bool p_room, QWidget* parent):

View file

@ -26,7 +26,7 @@
#include <QResizeEvent>
#include <QIcon>
#include "global.h"
#include "shared/message.h"
#include "message.h"
#include "progress.h"

View file

@ -18,6 +18,8 @@
#include "progress.h"
#include "shared/icons.h"
Progress::Progress(quint16 p_size, QWidget* parent):
QWidget(parent),
pixmap(new QGraphicsPixmapItem(Shared::icon("view-refresh", true).pixmap(p_size))),

View file

@ -27,8 +27,6 @@
#include <QVariantAnimation>
#include <QGridLayout>
#include "../../global.h"
/**
* @todo write docs
*/