Beta version 9048001 for Xcode and QtCreator.

This commit is contained in:
John Preston 2016-05-10 16:39:42 +03:00
parent d26a8cbdcc
commit 6188aea7ed
9 changed files with 39 additions and 18 deletions

View File

@ -169,11 +169,11 @@ template <typename T, size_t N> char(&ArraySizeHelper(T(&array)[N]))[N];
// For QFlags<> declared in private section of a class we need to declare
// operators from Q_DECLARE_OPERATORS_FOR_FLAGS as friend functions.
#define Q_DECLARE_FRIEND_INCOMPATIBLE_FLAGS(Flags) \
friend QIncompatibleFlag operator|(Flags::enum_type f1, int f2) Q_DECL_NOTHROW;
friend Q_DECL_CONSTEXPR QIncompatibleFlag operator|(Flags::enum_type f1, int f2) Q_DECL_NOTHROW;
#define Q_DECLARE_FRIEND_OPERATORS_FOR_FLAGS(Flags) \
friend QFlags<Flags::enum_type> operator|(Flags::enum_type f1, Flags::enum_type f2) Q_DECL_NOTHROW; \
friend QFlags<Flags::enum_type> operator|(Flags::enum_type f1, QFlags<Flags::enum_type> f2) Q_DECL_NOTHROW; \
friend Q_DECL_CONSTEXPR QFlags<Flags::enum_type> operator|(Flags::enum_type f1, Flags::enum_type f2) Q_DECL_NOTHROW; \
friend Q_DECL_CONSTEXPR QFlags<Flags::enum_type> operator|(Flags::enum_type f1, QFlags<Flags::enum_type> f2) Q_DECL_NOTHROW; \
Q_DECLARE_FRIEND_INCOMPATIBLE_FLAGS(Flags)
// using for_const instead of plain range-based for loop to ensure usage of const_iterator

View File

@ -57,7 +57,7 @@ public:
int32 innerTop();
int32 innerBottom();
bool eventFilter(QObject *obj, QEvent *e);
bool eventFilter(QObject *obj, QEvent *e) override;
enum class ChooseMethod {
ByEnter,

View File

@ -5665,7 +5665,8 @@ void HistoryWidget::inlineBotResolveDone(const MTPcontacts_ResolvedPeer &result)
UserData *resolvedBot = nullptr;
if (result.type() == mtpc_contacts_resolvedPeer) {
const auto &d(result.c_contacts_resolvedPeer());
if (resolvedBot = App::feedUsers(d.vusers)) {
resolvedBot = App::feedUsers(d.vusers);
if (resolvedBot) {
if (!resolvedBot->botInfo || resolvedBot->botInfo->inlinePlaceholder.isEmpty()) {
resolvedBot = nullptr;
}

View File

@ -431,7 +431,7 @@ void PsMainWindow::psMacUpdateMenu() {
canPaste = !Application::clipboard()->text().isEmpty();
} else if (FlatTextarea *edit = qobject_cast<FlatTextarea*>(focused)) {
canCut = canCopy = canDelete = edit->textCursor().hasSelection();
canSelectAll = !edit->getLastText().isEmpty();
canSelectAll = !edit->isEmpty();
canUndo = edit->isUndoAvailable();
canRedo = edit->isRedoAvailable();
canPaste = !Application::clipboard()->text().isEmpty();

View File

@ -83,12 +83,12 @@ QString FlatTextarea::tagsMimeType() {
}
FlatTextarea::FlatTextarea(QWidget *parent, const style::flatTextarea &st, const QString &pholder, const QString &v, const TagList &tags) : QTextEdit(parent)
, _lastTextWithTags { v, tags }
, _phVisible(!v.length())
, a_phLeft(_phVisible ? 0 : st.phShift)
, a_phAlpha(_phVisible ? 1 : 0)
, a_phColor(st.phColor->c)
, _a_appearance(animation(this, &FlatTextarea::step_appearance))
, _lastTextWithTags { v, tags }
, _st(st) {
setAcceptRichText(false);
resize(_st.width, _st.font->height);
@ -821,7 +821,7 @@ void FlatTextarea::parseLinks() { // some code is duplicated in text.cpp!
continue;
}
}
newLinks.push_back({ domainOffset - 1, p - start - domainOffset + 2 });
newLinks.push_back({ domainOffset - 1, static_cast<int>(p - start - domainOffset + 2) });
offset = matchOffset = p - start;
}

View File

@ -116,6 +116,8 @@ public:
public:
virtual QString mimeTagFromTag(const QString &tagId) = 0;
virtual QString tagFromMimeTag(const QString &mimeTag) = 0;
virtual ~TagMimeProcessor() {
}
};
void setTagMimeProcessor(std_::unique_ptr<TagMimeProcessor> &&processor);

View File

@ -125,6 +125,7 @@ SOURCES += \
./SourceFiles/dialogs/dialogs_indexed_list.cpp \
./SourceFiles/dialogs/dialogs_layout.cpp \
./SourceFiles/dialogs/dialogs_list.cpp \
./SourceFiles/history/field_autocomplete.cpp \
./SourceFiles/inline_bots/inline_bot_layout_internal.cpp \
./SourceFiles/inline_bots/inline_bot_layout_item.cpp \
./SourceFiles/inline_bots/inline_bot_result.cpp \
@ -248,6 +249,7 @@ HEADERS += \
./SourceFiles/dialogs/dialogs_list.h \
./SourceFiles/dialogs/dialogs_row.h \
./SourceFiles/history/history_common.h \
./SourceFiles/history/field_autocomplete.h \
./SourceFiles/inline_bots/inline_bot_layout_internal.h \
./SourceFiles/inline_bots/inline_bot_layout_item.h \
./SourceFiles/inline_bots/inline_bot_result.h \

View File

@ -75,6 +75,8 @@
076B1C5B1CBFC8F1002C0BC2 /* top_bar_widget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 076B1C591CBFC8F1002C0BC2 /* top_bar_widget.cpp */; };
076B1C5F1CBFC98F002C0BC2 /* overview_layout.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 076B1C5D1CBFC98F002C0BC2 /* overview_layout.cpp */; };
076B1C631CBFCC53002C0BC2 /* moc_top_bar_widget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 076B1C621CBFCC53002C0BC2 /* moc_top_bar_widget.cpp */; };
076C51D41CE205120038F22A /* field_autocomplete.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 076C51D21CE205120038F22A /* field_autocomplete.cpp */; };
076C51D71CE2069F0038F22A /* moc_field_autocomplete.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 076C51D61CE2069F0038F22A /* moc_field_autocomplete.cpp */; };
077A4AF71CA41C38002188D2 /* connection_abstract.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 077A4AEC1CA41C38002188D2 /* connection_abstract.cpp */; };
077A4AF81CA41C38002188D2 /* connection_auto.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 077A4AEE1CA41C38002188D2 /* connection_auto.cpp */; };
077A4AF91CA41C38002188D2 /* connection_http.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 077A4AF01CA41C38002188D2 /* connection_http.cpp */; };
@ -396,6 +398,9 @@
076B1C5D1CBFC98F002C0BC2 /* overview_layout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = overview_layout.cpp; path = SourceFiles/overview/overview_layout.cpp; sourceTree = SOURCE_ROOT; };
076B1C5E1CBFC98F002C0BC2 /* overview_layout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = overview_layout.h; path = SourceFiles/overview/overview_layout.h; sourceTree = SOURCE_ROOT; };
076B1C621CBFCC53002C0BC2 /* moc_top_bar_widget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_top_bar_widget.cpp; path = GeneratedFiles/Debug/moc_top_bar_widget.cpp; sourceTree = SOURCE_ROOT; };
076C51D21CE205120038F22A /* field_autocomplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = field_autocomplete.cpp; path = SourceFiles/history/field_autocomplete.cpp; sourceTree = SOURCE_ROOT; };
076C51D31CE205120038F22A /* field_autocomplete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = field_autocomplete.h; path = SourceFiles/history/field_autocomplete.h; sourceTree = SOURCE_ROOT; };
076C51D61CE2069F0038F22A /* moc_field_autocomplete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_field_autocomplete.cpp; path = GeneratedFiles/Debug/moc_field_autocomplete.cpp; sourceTree = SOURCE_ROOT; };
0771C4C94B623FC34BF62983 /* introwidget.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = introwidget.cpp; path = SourceFiles/intro/introwidget.cpp; sourceTree = "<absolute>"; };
077A4AEC1CA41C38002188D2 /* connection_abstract.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = connection_abstract.cpp; path = SourceFiles/mtproto/connection_abstract.cpp; sourceTree = SOURCE_ROOT; };
077A4AED1CA41C38002188D2 /* connection_abstract.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = connection_abstract.h; path = SourceFiles/mtproto/connection_abstract.h; sourceTree = SOURCE_ROOT; };
@ -884,6 +889,8 @@
076B1C561CBFC8C9002C0BC2 /* history */ = {
isa = PBXGroup;
children = (
076C51D21CE205120038F22A /* field_autocomplete.cpp */,
076C51D31CE205120038F22A /* field_autocomplete.h */,
076B1C571CBFC8D9002C0BC2 /* history_common.h */,
);
name = history;
@ -1207,6 +1214,7 @@
801973D3334D0FCA849CF485 /* Debug */ = {
isa = PBXGroup;
children = (
076C51D61CE2069F0038F22A /* moc_field_autocomplete.cpp */,
076B1C621CBFCC53002C0BC2 /* moc_top_bar_widget.cpp */,
07C8FE111CB80915007A8702 /* moc_toast_manager.cpp */,
077A4AFF1CA41EE2002188D2 /* moc_connection_abstract.cpp */,
@ -1675,6 +1683,7 @@
77DA1217B595B799FB72CDDA /* flatinput.cpp in Compile Sources */,
DE6A34CA3A5561888FA01AF1 /* flatlabel.cpp in Compile Sources */,
07C8FE041CB66D97007A8702 /* inline_bot_send_data.cpp in Compile Sources */,
076C51D41CE205120038F22A /* field_autocomplete.cpp in Compile Sources */,
03270F718426CFE84729079E /* flattextarea.cpp in Compile Sources */,
E3D7A5CA24541D5DB69D6606 /* images.cpp in Compile Sources */,
ADE99904299B99EB6135E8D9 /* scrollarea.cpp in Compile Sources */,
@ -1771,6 +1780,7 @@
07DE92AD1AA4928B00A18F6F /* moc_passcodebox.cpp in Compile Sources */,
FCC949FEA178F9F5D7478027 /* moc_flattextarea.cpp in Compile Sources */,
07DB674D1AD07C9200A51329 /* abstractbox.cpp in Compile Sources */,
076C51D71CE2069F0038F22A /* moc_field_autocomplete.cpp in Compile Sources */,
3F6EB1F5B98E704960FEA686 /* moc_scrollarea.cpp in Compile Sources */,
60CB4898955209B665E7B07D /* moc_twidget.cpp in Compile Sources */,
077A4B051CA41EE2002188D2 /* moc_connection_http.cpp in Compile Sources */,
@ -1903,11 +1913,13 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
CRASHPAD_PATH = ./../../Libraries/crashpad/crashpad;
CURRENT_PROJECT_VERSION = "$(TDESKTOP_VERSION)";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = "$(TDESKTOP_MAJOR_VERSION)";
DYLIB_CURRENT_VERSION = "$(TDESKTOP_VERSION)";
ENABLE_STRICT_OBJC_MSGSEND = YES;
FFMPEG_PATH = /usr/local;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;
@ -1940,6 +1952,7 @@
"$(CRASHPAD_PATH)",
"$(CRASHPAD_PATH)/third_party/mini_chromium/mini_chromium",
);
ICONV_PATH = /usr/local;
INFOPLIST_FILE = Telegram.plist;
INSTALL_DIR = ./../Mac/Release/;
LDPLUSPLUS = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++";
@ -1954,6 +1967,7 @@
);
MACOSX_DEPLOYMENT_TARGET = 10.8;
OBJROOT = "./../Mac/$(CONFIGURATION)Intermediate";
OPENAL_PATH = /usr/local;
OTHER_CFLAGS = (
"-pipe",
"-g",
@ -2015,15 +2029,11 @@
PRODUCT_NAME = Telegram;
QT_LIBRARY_SUFFIX = "";
QT_PATH = "/usr/local/tdesktop/Qt-5.6.0";
ZLIB_PATH = "/usr/local";
FFMPEG_PATH = "/usr/local";
ICONV_PATH = "/usr/local";
CRASHPAD_PATH = "./../../Libraries/crashpad/crashpad";
OPENAL_PATH = "/usr/local";
SDKROOT = macosx;
SYMROOT = ./../Mac;
TDESKTOP_MAJOR_VERSION = 0.9;
TDESKTOP_VERSION = 0.9.48;
ZLIB_PATH = /usr/local;
};
name = Release;
};
@ -2042,12 +2052,14 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
CRASHPAD_PATH = ./../../Libraries/crashpad/crashpad;
CURRENT_PROJECT_VERSION = "$(TDESKTOP_VERSION)";
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = "$(TDESKTOP_MAJOR_VERSION)";
DYLIB_CURRENT_VERSION = "$(TDESKTOP_VERSION)";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
FFMPEG_PATH = /usr/local;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;
@ -2080,6 +2092,7 @@
"$(CRASHPAD_PATH)",
"$(CRASHPAD_PATH)/third_party/mini_chromium/mini_chromium",
);
ICONV_PATH = /usr/local;
INFOPLIST_FILE = Telegram.plist;
INSTALL_DIR = ./../Mac/Debug/;
LDPLUSPLUS = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++";
@ -2095,6 +2108,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.8;
OBJROOT = "./../Mac/$(CONFIGURATION)Intermediate";
ONLY_ACTIVE_ARCH = YES;
OPENAL_PATH = /usr/local;
OTHER_CFLAGS = (
"-pipe",
"-g",
@ -2156,15 +2170,11 @@
PRODUCT_NAME = Telegram;
QT_LIBRARY_SUFFIX = _debug;
QT_PATH = "/usr/local/tdesktop/Qt-5.6.0";
ZLIB_PATH = "/usr/local";
FFMPEG_PATH = "/usr/local";
ICONV_PATH = "/usr/local";
CRASHPAD_PATH = "./../../Libraries/crashpad/crashpad";
OPENAL_PATH = "/usr/local";
SDKROOT = macosx;
SYMROOT = ./../Mac;
TDESKTOP_MAJOR_VERSION = 0.9;
TDESKTOP_VERSION = 0.9.48;
ZLIB_PATH = /usr/local;
};
name = Debug;
};

View File

@ -111,6 +111,7 @@ compilers: GeneratedFiles/qrc_telegram.cpp\
GeneratedFiles/Debug/moc_sessionsbox.cpp\
GeneratedFiles/Debug/moc_stickersetbox.cpp\
GeneratedFiles/Debug/moc_usernamebox.cpp\
GeneratedFiles/Debug/moc_field_autocomplete.cpp\
GeneratedFiles/Debug/moc_introwidget.cpp\
GeneratedFiles/Debug/moc_introcode.cpp\
GeneratedFiles/Debug/moc_introphone.cpp\
@ -237,6 +238,7 @@ compiler_moc_header_make_all: GeneratedFiles/Debug/moc_apiwrap.cpp\
GeneratedFiles/Debug/moc_sessionsbox.cpp\
GeneratedFiles/Debug/moc_stickersetbox.cpp\
GeneratedFiles/Debug/moc_usernamebox.cpp\
GeneratedFiles/Debug/moc_field_autocomplete.cpp\
GeneratedFiles/Debug/moc_introwidget.cpp\
GeneratedFiles/Debug/moc_introcode.cpp\
GeneratedFiles/Debug/moc_introphone.cpp\
@ -306,6 +308,7 @@ compiler_moc_header_clean:
GeneratedFiles/Debug/moc_sessionsbox.cpp\
GeneratedFiles/Debug/moc_stickersetbox.cpp\
GeneratedFiles/Debug/moc_usernamebox.cpp\
GeneratedFiles/Debug/moc_field_autocomplete.cpp\
GeneratedFiles/Debug/moc_introwidget.cpp\
GeneratedFiles/Debug/moc_introcode.cpp\
GeneratedFiles/Debug/moc_introphone.cpp\
@ -498,6 +501,9 @@ GeneratedFiles/Debug/moc_stickersetbox.cpp: SourceFiles/boxes/stickersetbox.h
GeneratedFiles/Debug/moc_usernamebox.cpp:SourceFiles/boxes/usernamebox.h
$(MOC_FILE) SourceFiles/boxes/usernamebox.h -o GeneratedFiles/Debug/moc_usernamebox.cpp
GeneratedFiles/Debug/moc_field_autocomplete.cpp: SourceFiles/history/field_autocomplete.h
$(MOC_FILE) SourceFiles/history/field_autocomplete.h -o GeneratedFiles/Debug/moc_field_autocomplete.cpp
GeneratedFiles/Debug/moc_introwidget.cpp: SourceFiles/intro/introwidget.h
$(MOC_FILE) SourceFiles/intro/introwidget.h -o GeneratedFiles/Debug/moc_introwidget.cpp