aither64 / haveclip-desktop Goto Github PK
View Code? Open in Web Editor NEWClipboard synchronization tool (PC version)
License: Other
Clipboard synchronization tool (PC version)
License: Other
haveclip-desktop/haveclip-desktop/src/HaveClip.cpp
Lines 256 to 258 in e801286
haveclip-desktop/haveclip-desktop/src/HaveClip.cpp
Lines 276 to 278 in e801286
Steps to reproduce:
Expected result (Qt 4.8: HaveClip v0.14 [macOS]): Only one instance of the SettingsDialog
has been created and after the step 1, the previously opened dialog comes to the front and receives the focus.
Actual result (Qt 4.8: HaveClip v0.13 [Win]; Qt 5.12: HaveClip v0.15+ [macOS]): Multiple instance of the SettingsDialog
has been created.
The same thing happens with the About dialog.
Importance: This is a minor issue.
Note: This occurs regardless of applying the changes from the "Fix missing focus on a dialog when LSUIElement key is set" commit, and even adding a call to setModal(true)
:
void HaveClip::showSettings()
{
SettingsDialog *dlg = new SettingsDialog(manager->connectionManager());
#ifdef Q_OS_MAC
dlg->setModal(true);
// Set focus
dlg->open();
dlg->raise();
#endif
if(dlg->exec() == QDialog::Accepted)
{
dlg->apply();
Settings::get()->save();
}
dlg->deleteLater(); // or `dlg->setAttribute(Qt::WA_DeleteOnClose)` before `open()`
}
IMHO: Modal dialogs are not necessary here — there is no reason to block the Settings and About dialogs from being shown at the same time.
Errors:
-25293
errSecAuthFailed-67030
errSecCSInfoPlistFailedThe HaveClip.app
works only on first run after new (unique) build — can't access the client cert/key in keychain (Secure Transport macOS native TLS/SSL backend automatically puts it there).
Clear (delete existing ".app") and build
$ codesign -dvvvv HaveClip.app
HaveClip.app: code object is not signed at all
$ codesign -vvvv HaveClip.app
HaveClip.app: code object is not signed at all
In architecture: x86_64
$ HaveClip.app/Contents/MacOS/HaveClip
Listening on QHostAddress("192.0.2.1") 9999
Remote control socket "/Users/_/Library/Application Support/HaveFun.cz/HaveClip-dev/haveclip.sock"
Send message 4 28 bytes
Received message 36
Send "text/html"
Send "text/plain"
Send message 6 753 bytes
Confirmed
Received message 28
Unable to reach "192.0.2.2" : QAbstractSocket::RemoteHostClosedError
Connection error QAbstractSocket::RemoteHostClosedError (0): "The TLS/SSL connection has been closed"
Communicator::onDisconnect
$ codesign -dvvvv HaveClip.app
Executable=/Users/_/.../HaveClip.app/Contents/MacOS/HaveClip
Identifier=cz.havefun.HaveClip-dev
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20100 size=5160 flags=0x2(adhoc) hashes=156+3 location=system
Hash type=sha256 size=32
CandidateCDHash sha256=00c3d9c6e70d6166cd8b1b4cf74627e651d600e4
Hash choices=sha256
Page size=4096
CDHash=00c3d9c6e70d6166cd8b1b4cf74627e651d600e4
Signature=adhoc
Info.plist entries=11
TeamIdentifier=not set
Sealed Resources version=2 rules=13 files=2
Internal requirements count=0 size=12
$ codesign -vvvv HaveClip.app
HaveClip.app: valid on disk
HaveClip.app: satisfies its Designated Requirement
Note: In the program output and in the logs, you may have noticed the reference to cz.havefun.HaveClip-dev
— I temporarily renamed HaveClip
to HaveClip-dev
in "Main.cpp:35" and in a custom "Info.plist" file (CFBundleIdentifier
key).
$ HaveClip.app/Contents/MacOS/HaveClip
Listening on QHostAddress("192.0.2.1") 9999
Remote control socket "/Users/_/Library/Application Support/HaveFun.cz/HaveClip-dev/haveclip.sock"
Unable to reach "192.0.2.2" : QAbstractSocket::SocketError(13)
Connection error QAbstractSocket::SocketError(13) (0): "SSLHandshake failed: -25293"
Communicator::onDisconnect
location=system
→ location=embedded
)$ codesign -f -s - HaveClip.app
HaveClip.app: replacing existing signature
$ codesign -dvvvv HaveClip.app
Executable=/Users/_/.../HaveClip.app/Contents/MacOS/HaveClip
Identifier=cz.havefun.HaveClip-dev
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20100 size=5160 flags=0x2(adhoc) hashes=156+3 location=embedded
VersionPlatform=1
VersionMin=658432
VersionSDK=658944
Hash type=sha256 size=32
CandidateCDHash sha256=4444444444444444444444444444444444444444
Hash choices=sha256
Page size=4096
CDHash=4444444444444444444444444444444444444444
Signature=adhoc
Info.plist entries=11
TeamIdentifier=not set
Sealed Resources version=2 rules=13 files=2
Internal requirements count=0 size=12
$ codesign -vvvv HaveClip.app
HaveClip.app: valid on disk
HaveClip.app: satisfies its Designated Requirement
$ HaveClip.app/Contents/MacOS/HaveClip
Listening on QHostAddress("192.0.2.1") 9999
Remote control socket "/Users/_/Library/Application Support/HaveFun.cz/HaveClip-dev/haveclip.sock"
Send message 4 28 bytes
Received message 36
Send "text/plain"
Send message 6 66 bytes
Confirmed
Received message 28
Unable to reach "192.0.2.2" : QAbstractSocket::RemoteHostClosedError
Connection error QAbstractSocket::RemoteHostClosedError (0): "The TLS/SSL connection has been closed"
Communicator::onDisconnect
$ HaveClip.app/Contents/MacOS/HaveClip
Listening on QHostAddress("192.0.2.1") 9999
Remote control socket "/Users/_/Library/Application Support/HaveFun.cz/HaveClip-dev/haveclip.sock"
Send message 4 28 bytes
Received message 36
Send "text/plain"
Send message 6 90163 bytes
Confirmed
Received message 28
Unable to reach "192.0.2.2" : QAbstractSocket::RemoteHostClosedError
Connection error QAbstractSocket::RemoteHostClosedError (0): "The TLS/SSL connection has been closed"
Communicator::onDisconnect
Links:
codesign
) and do not run spctl
(on local machine) to Test a Code Signature, run in virtual machine onlymacdeployqt
, codesign --no-legacy-signing
, answer]
_debug
, QTBUG-23268, QTBUG-32896, answer]macdeployqt .app -codesign=
otool -L .app/Contents/MacOS/App
macdeployqt .app -codesign=- -verbose=2
codesign -f -s - .app
(ad-hoc signing → Signature=adhoc
in the codesign -dvvvv HaveClip.app
output above)
"-25293" errSecAuthFailed
Also:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.