mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Xcode 8 supported. Fixed quit by Cmd+Q in case of macOS fullscreen window.
This commit is contained in:
parent
96202f775c
commit
708bf688ea
@ -126,6 +126,13 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) {
|
||||
}
|
||||
}
|
||||
|
||||
bool Application::event(QEvent *e) {
|
||||
if (e->type() == QEvent::Close) {
|
||||
App::quit();
|
||||
}
|
||||
return QApplication::event(e);
|
||||
}
|
||||
|
||||
void Application::socketConnected() {
|
||||
LOG(("Socket connected, this is not the first application instance, sending show command..."));
|
||||
_secondInstance = true;
|
||||
|
@ -28,12 +28,12 @@ class Application : public QApplication {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
Application(int &argc, char **argv);
|
||||
|
||||
bool event(QEvent *e) override;
|
||||
|
||||
// Single instance application
|
||||
public slots:
|
||||
|
||||
void socketConnected();
|
||||
void socketError(QLocalSocket::LocalSocketError e);
|
||||
void socketDisconnected();
|
||||
@ -48,7 +48,6 @@ public slots:
|
||||
void closeApplication(); // will be done in aboutToQuit()
|
||||
|
||||
private:
|
||||
|
||||
typedef QPair<QLocalSocket*, QByteArray> LocalClient;
|
||||
typedef QList<LocalClient> LocalClients;
|
||||
|
||||
@ -64,7 +63,6 @@ private:
|
||||
|
||||
// Autoupdating
|
||||
public:
|
||||
|
||||
void startUpdateCheck(bool forceWait);
|
||||
void stopUpdate();
|
||||
|
||||
@ -78,7 +76,6 @@ public:
|
||||
int32 updatingReady();
|
||||
|
||||
signals:
|
||||
|
||||
void updateChecking();
|
||||
void updateLatest();
|
||||
void updateProgress(qint64 ready, qint64 total);
|
||||
@ -86,7 +83,6 @@ signals:
|
||||
void updateFailed();
|
||||
|
||||
public slots:
|
||||
|
||||
void updateCheck();
|
||||
|
||||
void updateGotCurrent();
|
||||
@ -96,7 +92,6 @@ public slots:
|
||||
void onUpdateFailed();
|
||||
|
||||
private:
|
||||
|
||||
SingleTimer _updateCheckTimer;
|
||||
QNetworkReply *_updateReply = nullptr;
|
||||
QNetworkAccessManager _updateManager;
|
||||
|
@ -191,7 +191,6 @@
|
||||
'<(qt_loc)/plugins/bearer',
|
||||
'<(qt_loc)/plugins/platforms',
|
||||
'<(qt_loc)/plugins/imageformats',
|
||||
'<(qt_loc)/plugins/platforminputcontexts',
|
||||
],
|
||||
'defines': [
|
||||
'QT_WIDGETS_LIB',
|
||||
@ -201,6 +200,9 @@
|
||||
],
|
||||
'conditions': [
|
||||
[ 'build_linux', {
|
||||
'library_dirs': [
|
||||
'<(qt_loc)/plugins/platforminputcontexts',
|
||||
],
|
||||
'libraries': [
|
||||
'/usr/local/lib/libxkbcommon.a',
|
||||
'<@(qt_libs_release)',
|
||||
|
@ -11,7 +11,7 @@ if [ "$MySystem" == "Linux" ]; then
|
||||
../../../Libraries/gyp/gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=cmake
|
||||
cd ../../out/Debug
|
||||
../../../Libraries/cmake-3.6.2/bin/cmake .
|
||||
cd ../Release
|
||||
cd ../Release
|
||||
../../../Libraries/cmake-3.6.2/bin/cmake .
|
||||
cd ../../Telegram/gyp
|
||||
else
|
||||
@ -19,7 +19,7 @@ else
|
||||
#gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode-ninja
|
||||
#gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode
|
||||
# use patched gyp with Xcode project generator
|
||||
../../../Libraries/gyp/gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode
|
||||
../../../Libraries/gyp/gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp -Gxcode_upgrade_check_project_version=800 --format=xcode
|
||||
fi
|
||||
|
||||
cd ../..
|
||||
|
@ -91,14 +91,22 @@
|
||||
'lzma',
|
||||
],
|
||||
}],
|
||||
[ 'build_mac', {
|
||||
'include_dirs': [
|
||||
'<(libs_loc)/openssl-xcode/include'
|
||||
],
|
||||
'library_dirs': [
|
||||
'<(libs_loc)/openssl-xcode',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'OTHER_LDFLAGS': [
|
||||
'-lssl',
|
||||
'-lcrypto',
|
||||
'-llzma',
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
'xcode_settings': {
|
||||
'OTHER_LDFLAGS': [
|
||||
'-lssl',
|
||||
'-lcrypto',
|
||||
'-llzma',
|
||||
],
|
||||
},
|
||||
'include_dirs': [
|
||||
'<(src_loc)',
|
||||
'<(libs_loc)/lzma/C',
|
||||
|
Loading…
Reference in New Issue
Block a user