mirror of https://github.com/procxx/kepka.git
Add todo notes
This commit is contained in:
parent
7e683880be
commit
fb2fe2057d
|
@ -30,6 +30,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
// @todo are there no other ways to get/set hex?
|
||||||
QChar _toHex(ushort v) {
|
QChar _toHex(ushort v) {
|
||||||
v = v & 0x000F;
|
v = v & 0x000F;
|
||||||
return QChar::fromLatin1((v >= 10) ? ('a' + (v - 10)) : ('0' + v));
|
return QChar::fromLatin1((v >= 10) ? ('a' + (v - 10)) : ('0' + v));
|
||||||
|
@ -38,6 +39,7 @@ ushort _fromHex(QChar c) {
|
||||||
return ((c.unicode() >= uchar('a')) ? (c.unicode() - uchar('a') + 10) : (c.unicode() - uchar('0'))) & 0x000F;
|
return ((c.unicode() >= uchar('a')) ? (c.unicode() - uchar('a') + 10) : (c.unicode() - uchar('0'))) & 0x000F;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @todo urlencode/decode functions might help here??
|
||||||
QString _escapeTo7bit(const QString &str) {
|
QString _escapeTo7bit(const QString &str) {
|
||||||
QString result;
|
QString result;
|
||||||
result.reserve(str.size() * 2);
|
result.reserve(str.size() * 2);
|
||||||
|
|
|
@ -22,6 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
namespace base {
|
namespace base {
|
||||||
|
|
||||||
|
// @todo use ranges-v3 here
|
||||||
template <typename Range, typename Method>
|
template <typename Range, typename Method>
|
||||||
decltype(auto) for_each(Range &&range, Method &&method) {
|
decltype(auto) for_each(Range &&range, Method &&method) {
|
||||||
return std::for_each(
|
return std::for_each(
|
||||||
|
|
|
@ -22,7 +22,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// thanks Chromium
|
// thanks Chromium - @todo replace this with cmake-generated config file
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#define OS_MAC 1
|
#define OS_MAC 1
|
||||||
|
|
|
@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
// @todo replace this with std::experimental::observer_ptr
|
||||||
|
|
||||||
namespace base {
|
namespace base {
|
||||||
|
|
||||||
class enable_weak_from_this;
|
class enable_weak_from_this;
|
||||||
|
|
|
@ -294,7 +294,7 @@ void finish();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
using TimeMs = qint64;
|
using TimeMs = qint64; // @todo use std::chrono::milliseconds
|
||||||
bool checkms(); // returns true if time has changed
|
bool checkms(); // returns true if time has changed
|
||||||
TimeMs getms(bool checked = false);
|
TimeMs getms(bool checked = false);
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ inline QString fromUtf8Safe(const QByteArray &str) {
|
||||||
static const QRegularExpression::PatternOptions reMultiline(QRegularExpression::DotMatchesEverythingOption | QRegularExpression::MultilineOption);
|
static const QRegularExpression::PatternOptions reMultiline(QRegularExpression::DotMatchesEverythingOption | QRegularExpression::MultilineOption);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline T snap(const T &v, const T &_min, const T &_max) {
|
inline T snap(const T &v, const T &_min, const T &_max) { // @todo std::clamp()
|
||||||
return (v < _min) ? _min : ((v > _max) ? _max : v);
|
return (v < _min) ? _min : ((v > _max) ? _max : v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -336,7 +336,7 @@ public:
|
||||||
_inGrab = true;
|
_inGrab = true;
|
||||||
resizeEvent(0);
|
resizeEvent(0);
|
||||||
}
|
}
|
||||||
void grapWithoutTopBarShadow();
|
void grapWithoutTopBarShadow();//@fixme grab?
|
||||||
void grabFinish() override;
|
void grabFinish() override;
|
||||||
void rpcClear() override {
|
void rpcClear() override {
|
||||||
_inner->rpcClear();
|
_inner->rpcClear();
|
||||||
|
|
|
@ -27,6 +27,7 @@ namespace Emoji {
|
||||||
|
|
||||||
static_assert(sizeof(char16_t) == 2, "Bad UTF-16 character size.");
|
static_assert(sizeof(char16_t) == 2, "Bad UTF-16 character size.");
|
||||||
|
|
||||||
|
// @todo kill this off, use std::u16string instead
|
||||||
class utf16string {
|
class utf16string {
|
||||||
public:
|
public:
|
||||||
utf16string() = default;
|
utf16string() = default;
|
||||||
|
|
Loading…
Reference in New Issue