1
0
Fork 0
forked from blue/squawk

Fixing build without omemo, release preparation, unnecessary inheritance removed, info widget fix

This commit is contained in:
Blue 2024-02-04 09:44:19 -03:00
parent 829777935f
commit acd60eaba2
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
13 changed files with 92 additions and 40 deletions

View file

@ -19,13 +19,13 @@
#include <QXmppGlobal.h>
#include <QDebug>
#if (QXMPP_VERSION) < QT_VERSION_CHECK(1, 3, 0)
static const std::string QXMPP_VERSION_PATCH(std::to_string(QXMPP_VERSION & 0xff));
static const std::string QXMPP_VERSION_MINOR(std::to_string((QXMPP_VERSION & 0xff00) >> 8));
static const std::string QXMPP_VERSION_MAJOR(std::to_string(QXMPP_VERSION >> 16));
static const QString QXMPP_VERSION_STRING = QString::fromStdString(QXMPP_VERSION_MAJOR + "." + QXMPP_VERSION_MINOR + "." + QXMPP_VERSION_PATCH);
#if (QXMPP_VERSION) < QT_VERSION_CHECK(1, 2, 0)
static const std::string _QXMPP_PATCH_(std::to_string(QXMPP_VERSION & 0xff));
static const std::string _QXMPP_MINOR_(std::to_string((QXMPP_VERSION & 0xff00) >> 8));
static const std::string _QXMPP_MAJOR_(std::to_string(QXMPP_VERSION >> 16));
static const QString SQUAWK_INNER_QXMPP_VERSION_STRING = QString::fromStdString(_QXMPP_MAJOR_ + "." + _QXMPP_MINOR_ + "." + _QXMPP_PATCH_);
#else
static const QString QXMPP_VERSION_STRING = QXmppVersion();
static const QString SQUAWK_INNER_QXMPP_VERSION_STRING = QXmppVersion();
#endif
About::About(QWidget* parent):
@ -39,7 +39,7 @@ About::About(QWidget* parent):
m_ui->qtBuiltAgainstVersion->setText(tr("(built against %1)").arg(QT_VERSION_STR));
m_ui->qxmppVersionValue->setText(QXmppVersion());
m_ui->qxmppBuiltAgainstVersion->setText(tr("(built against %1)").arg(QXMPP_VERSION_STRING));
m_ui->qxmppBuiltAgainstVersion->setText(tr("(built against %1)").arg(SQUAWK_INNER_QXMPP_VERSION_STRING));
setWindowFlag(Qt::Tool);
@ -52,8 +52,7 @@ About::~About() {
}
};
void About::onLicenseActivated()
{
void About::onLicenseActivated() {
if (license == nullptr) {
QFile file;
bool found = false;
@ -106,7 +105,6 @@ void About::onLicenseActivated()
license->show();
}
void About::onLicenseClosed()
{
void About::onLicenseClosed() {
license = nullptr;
}

View file

@ -14,8 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef ABOUT_H
#define ABOUT_H
#pragma once
#include <QWidget>
#include <QScopedPointer>
@ -24,16 +23,11 @@
#include <QTextStream>
#include <QStandardPaths>
namespace Ui
{
namespace Ui{
class About;
}
/**
* @todo write docs
*/
class About : public QWidget
{
class About : public QWidget {
Q_OBJECT
public:
About(QWidget* parent = nullptr);
@ -47,5 +41,3 @@ private:
QScopedPointer<Ui::About> m_ui;
QWidget* license;
};
#endif // ABOUT_H