mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 13:08:48 +03:00
Linting
This commit is contained in:
parent
bdf9b6e0fb
commit
847ae37df2
4 changed files with 16 additions and 18 deletions
20
dist/Gentoo/nheko-9999.ebuild
vendored
20
dist/Gentoo/nheko-9999.ebuild
vendored
|
@ -9,8 +9,8 @@ HOMEPAGE="https://github.com/mujx/nheko"
|
||||||
inherit git-r3 eutils cmake-utils
|
inherit git-r3 eutils cmake-utils
|
||||||
|
|
||||||
if [[ ${PV} == "9999" ]]; then
|
if [[ ${PV} == "9999" ]]; then
|
||||||
SRC_URI=""
|
SRC_URI=""
|
||||||
EGIT_REPO_URI="git://github.com/mujx/nheko.git"
|
EGIT_REPO_URI="git://github.com/mujx/nheko.git"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LICENSE="GPL-3"
|
LICENSE="GPL-3"
|
||||||
|
@ -18,26 +18,26 @@ SLOT="0"
|
||||||
IUSE=""
|
IUSE=""
|
||||||
|
|
||||||
DEPEND=">=dev-qt/qtgui-5.7.1
|
DEPEND=">=dev-qt/qtgui-5.7.1
|
||||||
media-libs/fontconfig"
|
media-libs/fontconfig"
|
||||||
RDEPEND="${DEPEND}"
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
cmake-utils_src_configure
|
cmake-utils_src_configure
|
||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
emake DESTDIR="${D}"
|
emake DESTDIR="${D}"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
local icon_size
|
local icon_size
|
||||||
for icon_size in 16 32 48 64 128 256 512; do
|
for icon_size in 16 32 48 64 128 256 512; do
|
||||||
newicon -s "${icon_size}" \
|
newicon -s "${icon_size}" \
|
||||||
"${S}/resources/nheko-${icon_size}.png" \
|
"${S}/resources/nheko-${icon_size}.png" \
|
||||||
nheko.png
|
nheko.png
|
||||||
done
|
done
|
||||||
|
|
||||||
domenu ${S}/resources/nheko.desktop
|
domenu ${S}/resources/nheko.desktop
|
||||||
|
|
||||||
dobin ${S}/build/nheko
|
dobin ${S}/build/nheko
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
#include "Deserializable.h"
|
#include "Deserializable.h"
|
||||||
|
|
||||||
|
|
||||||
class VersionsResponse : public Deserializable
|
class VersionsResponse : public Deserializable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -38,5 +37,4 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
QVector<Version_> supported_versions_;
|
QVector<Version_> supported_versions_;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
#include "LoginPage.h"
|
#include "LoginPage.h"
|
||||||
|
|
||||||
LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, inferredServerAddress_()
|
, inferredServerAddress_()
|
||||||
, client_{client}
|
, client_{client}
|
||||||
{
|
{
|
||||||
setStyleSheet("background-color: #f9f9f9");
|
setStyleSheet("background-color: #f9f9f9");
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ void LoginPage::versionError(QString error)
|
||||||
QString mxidAddress = matrixid_input_->text().split(":").at(1);
|
QString mxidAddress = matrixid_input_->text().split(":").at(1);
|
||||||
if (currentServer.host() == inferredServerAddress_ && !currentServer.host().startsWith("matrix")) {
|
if (currentServer.host() == inferredServerAddress_ && !currentServer.host().startsWith("matrix")) {
|
||||||
error_label_->setText("");
|
error_label_->setText("");
|
||||||
currentServer.setHost(QString("matrix.")+currentServer.host());
|
currentServer.setHost(QString("matrix.") + currentServer.host());
|
||||||
serverInput_->setText(currentServer.host());
|
serverInput_->setText(currentServer.host());
|
||||||
client_->setServer(currentServer.host());
|
client_->setServer(currentServer.host());
|
||||||
client_->versions();
|
client_->versions();
|
||||||
|
|
|
@ -35,7 +35,7 @@ void VersionsResponse::deserialize(const QJsonDocument &data)
|
||||||
throw DeserializationException("Versions: missing version list");
|
throw DeserializationException("Versions: missing version list");
|
||||||
|
|
||||||
auto versions = object.value("versions").toArray();
|
auto versions = object.value("versions").toArray();
|
||||||
for (auto const &elem: versions) {
|
for (auto const &elem : versions) {
|
||||||
QString str = elem.toString();
|
QString str = elem.toString();
|
||||||
QRegExp rx("r(\\d+)\\.(\\d+)\\.(\\d+)");
|
QRegExp rx("r(\\d+)\\.(\\d+)\\.(\\d+)");
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ void VersionsResponse::deserialize(const QJsonDocument &data)
|
||||||
|
|
||||||
bool VersionsResponse::isVersionSupported(unsigned int major, unsigned int minor, unsigned int patch)
|
bool VersionsResponse::isVersionSupported(unsigned int major, unsigned int minor, unsigned int patch)
|
||||||
{
|
{
|
||||||
for (auto &v: supported_versions_) {
|
for (auto &v : supported_versions_) {
|
||||||
if (v.major_ == major && v.minor_ == minor && v.patch_ >= patch)
|
if (v.major_ == major && v.minor_ == minor && v.patch_ >= patch)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue