QString expansion;
Alias(const QString &name_, const QString &expansion_) : name(name_), expansion(expansion_) {}
};
- typedef QList<Alias> AliasList;
+ using AliasList = QList<Alias>;
int indexOf(const QString &name) const;
inline bool contains(const QString &name) const { return indexOf(name) != -1; }
static AliasList defaults();
- typedef QList<QPair<BufferInfo, QString> > CommandList;
+ using CommandList = QList<QPair<BufferInfo, QString>>;
CommandList processInput(const BufferInfo &info, const QString &message);
// void deleteBufferViewsRequested(const QVariantList &bufferViews);
protected:
- typedef QHash<int, BufferViewConfig *> BufferViewConfigHash;
+ using BufferViewConfigHash = QHash<int, BufferViewConfig *>;
inline const BufferViewConfigHash &bufferViewConfigHash() { return _bufferViewConfigs; }
virtual BufferViewConfig *bufferViewConfigFactory(int bufferViewConfigId);
}
};
- typedef QHash<uint, QList<Handler> > HandlerHash;
+ using HandlerHash = QHash<uint, QList<Handler>>;
inline const HandlerHash ®isteredHandlers() const { return _registeredHandlers; }
inline HandlerHash ®isteredHandlers() { return _registeredHandlers; }
mutable ExpressionMatch _ctcpSenderMatch = {}; ///< Expression match cache for CTCP nick
};
- typedef QList<IgnoreListItem> IgnoreList;
+ using IgnoreList = QList<IgnoreListItem>;
int indexOf(const QString &ignore) const;
inline bool contains(const QString &ignore) const { return indexOf(ignore) != -1; }
};
-typedef QList<Message> MessageList;
+using MessageList = QList<Message>;
QDataStream &operator<<(QDataStream &out, const Message &msg);
QDataStream &operator>>(QDataStream &in, Message &msg);
bool operator==(const Server &other) const;
bool operator!=(const Server &other) const;
};
- typedef QList<Server> ServerList;
+ using ServerList = QList<Server>;
Network(const NetworkId &networkid, QObject *parent = nullptr);
~Network() override;
};
// We need to special-case Peer* in attached signals/slots, so typedef it for the meta type system
-typedef Peer * PeerPtr;
+using PeerPtr = Peer *;
Q_DECLARE_METATYPE(PeerPtr)
QDataStream &operator<<(QDataStream &out, PeerPtr ptr);
public:
// second value is the protocol-specific features
- typedef QPair<Protocol::Type, quint16> ProtoDescriptor;
- typedef QVector<ProtoDescriptor> ProtoList;
+ using ProtoDescriptor = QPair<Protocol::Type, quint16>;
+ using ProtoList = QVector<ProtoDescriptor>;
static ProtoList supportedProtocols();
SignalRelay *_signalRelay;
// RPC function -> (object, slot ID)
- typedef QPair<QObject *, int> MethodId;
- typedef QMultiHash<QByteArray, MethodId> SlotHash;
+ using MethodId = QPair<QObject *, int>;
+ using SlotHash = QMultiHash<QByteArray, MethodId>;
SlotHash _attachedSlots;
// slaves for sync
- typedef QHash<QString, SyncableObject *> ObjectId;
+ using ObjectId = QHash<QString, SyncableObject *>;
QHash<QByteArray, ObjectId> _syncSlave;
ProxyMode _proxyMode;
Q_DECLARE_METATYPE(QHostAddress)
// a few typedefs
-typedef QList<MsgId> MsgIdList;
-typedef QList<BufferId> BufferIdList;
+using MsgIdList = QList<MsgId>;
+using BufferIdList = QList<BufferId>;
/**
* Catch-all stream serialization operator for enum types.
ChatLineModel(QObject *parent = nullptr);
- typedef ChatLineModelItem::Word Word;
- typedef ChatLineModelItem::WrapList WrapList;
+ using Word = ChatLineModelItem::Word;
+ using WrapList = ChatLineModelItem::WrapList;
inline const MessageModelItem *messageItemAt(int i) const override { return &_messageList[i]; }
protected:
// virtual MessageModelItem *createMessageModelItem(const Message &);
// This Struct is taken from Harfbuzz. We use it only to calc it's size.
// we use a shared memory region so we do not have to malloc a buffer area for every line
-typedef struct {
+using HB_CharAttributes_Dummy = struct {
/*HB_LineBreakType*/ unsigned lineBreakType : 2;
/*HB_Bool*/ unsigned whiteSpace : 1; /* A unicode whitespace character, except NBSP, ZWNBSP */
/*HB_Bool*/ unsigned charStop : 1; /* Valid cursor position (for left/right arrow) */
/*HB_Bool*/ unsigned wordBoundary : 1;
/*HB_Bool*/ unsigned sentenceBoundary : 1;
unsigned unused : 2;
-} HB_CharAttributes_Dummy;
+};
unsigned char *ChatLineModelItem::TextBoundaryFinderBuffer = (unsigned char *)malloc(512 * sizeof(HB_CharAttributes_Dummy));
int ChatLineModelItem::TextBoundaryFinderBufferSize = 512 * (sizeof(HB_CharAttributes_Dummy) / sizeof(unsigned char));
qreal width;
qreal trailing;
};
- typedef QVector<Word> WrapList;
+ using WrapList = QVector<Word>;
private:
QVariant timestampData(int role) const;
QByteArray data;
};
-typedef QVector<DBusImageStruct> DBusImageVector;
+using DBusImageVector = QVector<DBusImageStruct>;
struct DBusToolTipStruct {
QString icon;
inline const QHash<UiStyle::ItemFormatType, QTextCharFormat> &listItemFormats() const { return _listItemFormats; }
protected:
- typedef QList<qreal> ColorTuple;
+ using ColorTuple = QList<qreal>;
void parseChatLineBlock(const QString &decl, const QString &contents);
void parsePaletteBlock(const QString &decl, const QString &contents);