Commit Graph

120 Commits

Author SHA1 Message Date
b29c5b1bb2 refactor: use contains to find if an item is in a container 2025-06-20 09:39:26 +01:00
aacf922319 refactor: remove names for unused handle function args 2025-06-20 09:39:26 +01:00
66e201c8ef chore: remove handle* methods that are a single oneline forward and use the line directly 2025-06-18 13:17:16 +01:00
3a35b183d3 refactor: use std::function for Event callback
based on 6d347337c3
2025-06-18 13:17:16 +01:00
e6a374369b chore: use const for more local ref and pointer vars 2025-05-28 09:42:08 +01:00
475b895755 chore: initialize class vars using the order class define, initilizer list, constructor 2025-05-23 10:19:11 -07:00
a33574e1bd chore: use more ranged for loops 2025-05-22 20:46:41 +01:00
fe12972e83 chore: use const pointer / ref where possible 2025-05-22 20:46:41 +01:00
52b0c1f061 chore: use auto or (const auto) where possible 2025-05-20 16:20:07 +01:00
635962618f chore: define only one variable per line 2025-05-20 16:20:07 +01:00
0ff72441e6 chore: use c++17 style if,switch init-initilizer where possible
chore: correct spelling of "colon" in NetworkAddresses variables
chore: correct some multi line defines near needed init-initilizers
2025-05-20 16:20:07 +01:00
b56a282a9c refactor: port ServerTests to QtTests
remove TEST_ENV items from Server
2025-05-08 15:26:44 +01:00
5365e34f08 feat: remove drag and drop support, its broken on all platforms 2025-05-08 09:47:41 -04:00
55a7fa3266 Port simplified EventTypes from 8b23570379 2025-05-05 17:17:01 -04:00
b3f179a08a chore: Server, use auto where possible 2025-04-28 13:50:43 +01:00
63d65bb47b chore: use nullptr where possible in place of NULL 2025-04-28 13:08:40 +01:00
48f824ca31 chore: Server, default should be first or last case for switches 2025-04-28 11:47:04 +01:00
80afb92af1 chore: remove more code for inverse connection
related: https://github.com/deskflow/deskflow/pull/8240
2025-04-21 22:39:28 +01:00
45b6ff19e7 chore: remove StdExcept and include stdexcept directly where needed
remove _NOEXCEPT define and just use throw()
2025-03-21 11:42:32 +00:00
4a16804d27 chore: rename lib/common/stdexcept.h => lib/common/StdExcept.h 2025-03-20 13:06:45 +00:00
2ef23b8206 chore: rename lib/deskflow/protocol_types => lib/deskflow/ProtocolTypes 2025-03-20 13:06:45 +00:00
ecf70f09f3 chore: rename lib/deskflow/option_types => lib/deskflow/OptionTypes 2025-03-20 13:06:45 +00:00
dd895ed99f Fix typos Recieve in methods
...Recieve... =>
...Receive...

Signed-off-by: Kentaro Hayashi <kenhys@xdump.org>
2025-03-17 09:38:18 -04:00
1085df54ed refactor: Reuse compliance
build files and documentation: MIT
  images / sources: GPL-2.0-only
  breeze icons: LGPL-2.0-only
  Microsoft MSM file, vc redist license
2025-01-27 17:05:47 -05:00
96092df4fc refactor: replace UInt32 with uint32_t 2025-01-14 20:30:45 +00:00
27eb83c981 refactor: replace SInt32 with int32_t 2025-01-14 20:30:45 +00:00
3991e0c1a1 refactor: use std::string in place of String
basedon: https://github.com/debauchee/barrier/pull/709
2025-01-08 00:11:34 +00:00
2349ce7f52 chore: replace simple cases of typedef with using 2024-12-04 10:40:58 -05:00
a5cd0fab9e feat: Option to change server protocol in GUI 2024-10-19 23:46:42 +01:00
9b9ecb0d05 chore: Adjust Clang-format linter rules
120 Column Lines
 Block Indent for Bracket Align
 Custom Line Break Rules
 No Single Line Functions
2024-10-17 21:38:29 +01:00
219958898e chore: Replace assert with warning for screen boundary issue 2024-10-17 11:17:05 +01:00
6bb1bcad8c chore!: Relocate commercial code downstream 2024-10-01 14:39:05 +01:00
1003e07854 feat: Update onMouseMoveSecondary to allow offset adjustments 2024-09-24 18:53:30 +01:00
ed1217e9cc Use Deskflow Name (#7519)
* Use Deskflow Name

* Remove business-oriented options from issue templates

* Remove business-oriented workflow

* Bump version to 3.0.0 (to avoid confusion with previously used version numbers 1.x & 2.x)

* Update readme to reflect new project name and goals

* Found some more "synergy" to rename

* Rename `synlib` to `app`

* Rename `syntool` to `deskflow-legacy`

* Rename `synwinhk` to `dfwhook`

* Rename dirs from synergy to deskflow

* Rename more "Synergy" files

* Rename app bundle ID

* Fixed copyright typo

* Rename only title in serial key dialog (to be moved downstream later)

* Preserve original serial key window for moving downstream

* Restore dialogs ready for moving downstream

* Rename `QDeskflowApplication` to `DeskflowApplication` (the Q is confusing)

* Restore Volker's original project name

* Fixed mimetype

* Fixed weird grammar

* Fixed (more) weird grammar

* Broken link, restoring (but we should move all links out of source)

* Broken link, restoring (but we should move all links out of source)

* Add write permission to valgrind-analysis.yml

* Restore AUR conflicts

* Apply Clang format

* Update ChangeLog

* Back out version change

---------

Co-authored-by: Nick Bolton <nick@symless.com>
2024-09-17 20:00:25 +01:00
b128863c67 Load server or client args from synergy-config.toml (#7467)
* Load args from .toml file

* Remove .toml files

* Handle _ arg as no key

* Remove dotenv-cpp

* Treat special last arg specially

* Improve restart warning

* Remove rogue include

* Move TOML config loader to new class

* Merge config files into one

* Add override to virtual functions

* Tidy up App decl and add missing overrides

* Add comments to organize function types

* Fixed: config.h doesn't work on Windows

* Move var position

* Improve includes in app classes

* Update ChangeLog

* Restore position of configure_file call

* Remove new entries in .in file
2024-09-02 23:48:57 +01:00
157fe818d8 Refactor local/global save/load and show dev thanks message (#7423)
* WIP: Show dev thanks message

* Improve error messages and guard license code

* Print core command

* Allow license tests when licensing disabled by default

* Don't check invalid serial key

* Fixed typo

* Add error checking

* Use shared ptr instead of static deps

* Actually save and load the setting

* Add dev thanks vars to CI

* Show thanks message after connected

* Refactor hack-job of local/global save/load to remove coupling and use Qt events system

* Simplify config loading

* Overloads for optionals

* Fixed global config scope not loaded

* Save message state before showing to avoid multiple messages

* Update ChangeLog

* Fixed lint warnings

* Make function const

* Reduce verbosity

* Remove dead code, show version on start, tidy up lint warnings

* Make product name code safer

* Connect on enter press

* Only show server specific wording when on server

* Add emit commands

* Log info and error

* Remove deaad code

* Remove test member

* Disable start context menu action unless usable

* Show more relvant connect message

* Fixed close to tray not applied, and simplified restart core logic

* Remove redundant include
2024-08-03 01:17:29 +01:00
6b803618e9 Move try-catch to dtor point of stack 2024-07-29 23:59:21 +01:00
a99d1ca87d Catch exception propagating to Server dtor (#7416)
* Catch throw in dtor

* Update ChangeLog
2024-07-29 23:11:59 +01:00
9315b089c8 Improve UI design and reduce over-use of #ifdef (#7413)
* Rename `LicenseManager` to `License`

* Rename `LicenseManager` to `License`

* Move License class to gui lib

* Rename license related classes

* Refactor serial key parsing

* Don't fail fast on containers

* Move licensed product name from config to code

* Fixed formatting

* Update code coverage generator and fixed args

* WIP: Converting license to chrono

* WIP: Fixed compile errors, tests failing

* Fixed all serial key and license tests

* Disable verbose logging

* Add missing </p>

* Add missing include

* Revert code coverage config

* Handle parse errors

* Move more classes into the new gui lib and improve license/serial object ownership

* WIP: Fixing signal/slots in MainWindow

* Fixed slot for about to quit

* Rename manual slots to solve auto-connection warnings

* Fixed logging issue

* By default, don't close to tray

* Add .env support and furthe refactor license code, also fixed some copyright dates

* Remove test code

* Fixed memory error in .env parser and refactor more licensing display code

* Fixed color inconsistencies

* Fixed link colors and made log view expand

* Disable server components rather than hiding

* Reset years of blind UI layout fiddling

* Fixed clean Qt task

* Only show notice when time limited

* Fixed main window layout

* Show connected clients

* Set 15 spacing

* Auto connect on start

* More intentional screen size

* Fixed tests related to license

* Tests for expiry notifications

* Reorg tests and remove death test

* Update gtest

* Tests for dotenv parser

* Test command process

* What the heck is that doing there?

* Merge constants headers

* Fixed magic includes

* Remove helper function

* Remove comment

* Remove extern decl

* Update ChangeLog
2024-07-26 23:53:52 +01:00
e435953af7 Make Clang param and arg alignment more readable (#7387)
* Turn off alignment of params

* Apply Clang format

* Change AlignAfterOpenBracket to AlwaysBreak and add extra bin pack settings

* Restore default bin packing

* Apply format
2024-07-16 14:36:44 +01:00
50d29edd05 Solve SonarCloud security hotspots and bugs (#7383)
* Test: allocLockCursorToScreenInfo_withState_setsState

* Merge remote-tracking branch 'origin/master' into S1-1717-sonarcloud-issues

* Remove header wrappers for gmock/gtest

* Convenience wrapper script for tests

* Use `std::copy` instead of `strcpy`

* Use `std::ranges::copy` instead of `stdcpy`

* Delete dead code

* Add guitests VS Code config and test wrapper

* Revert "Delete dead code"

This reverts commit aa40f5cd35a22b4b69acfd1876aceea053088060.

* Build guitests with CMake

* Run all tests

* Don't use --gtest_filter for Qt tests

* Undo skip for GUI tests

* Coverage for `IpcClient::sendCommand`

* Remove provider and proxy

* Use lamda for StreamProvider to reduce boilerplate

* Restore version checker tests

* Remove activation souces

* Tasks for current/all tests

* Change command for tasks

* Mock QNetworkAccessManager

* Create core app to satisfy Qt assertations

* Use `std::copy` instead of `std::ranges::copy`

* Remove integtests

* Merge guitests into unittests

* Use std::string::length

* Remove include (resolves to root)

* Fix memory leaks

* Disable sigsegv tests

* Fixed formatting

* Remove guitests from CI

* New MainWindowTests

* Passing test for MainWindowTests

* Use alternative to strlen in MainWindow::checkSecureSocket

* Passing test for Log::print

* Fixed dtor call order

* Fixed var name typo

* Use proxy instead of `#define protected public`

* Add args test for log

* Add license ctor

* Fixed log test for release

* Add error log test

* Init qt with -platform offscreen

* Back-out initQt function

* Use QT_QPA_PLATFORM

* Try QT_QPA_PLATFORM=offscreen

* Use more readable env node

* Set QT_QPA_PLATFORM in CI and CodeQL

* Remove env not needed

* Modernize Log::print

* Calculate the length of the format string fmt during the initial scan loop

* More direct and efficient alterative to `strlen`

* Fixed major maint issues in AppConfig

* New clang and cmake rules

* Set `max_pargs_hwrap` to 4

* Undo clang format for now

* Fix missing `Setting::`

* Fixed missing `m_S` on Windows

* Re-add accidental dep resolution (fix later)

* Fixed missing buffer position increment

* Turn on errors

* Fixed tests and improve error message

* Fixed segfault on log refactor

* Extract log time to function

* Copyright date

* Update ChangeLog
2024-07-16 08:30:35 +00:00
37bb0f989e Format all source with Clang and introduce lint workflow (#7364)
* Lint script with CLang format

* Use `-i` for `clang-format` and add more logging for lint scripts

* Apply LLVM CLang formatting

* Fixed comment

* Update ChangeLog

* Fixed bad return code logic

* Improve output for linters

* Fixed re-used var in clang lint

* Fixed include order for tests and use `#if 0` instead of commenting out code

* Use full Clang format dump

* Dump Ubuntu Clang format

* Dump Clang format from Debian

* Dumped from: clang-format version 18.1.8

* Revert "Dumped from: clang-format version 18.1.8"

This reverts commit b9bbda2995bb0b4b65baf14afebb0361ec64e644.

* Remove BasedOnStyle

* Restore base Clang format file

* Use clang-format from pip

* Apply Clang format 18 style

* Add clang_format deps

* Fixed include order issues and *some* accidental includes
2024-07-02 20:07:06 +01:00
947efd5e58 Made log lines consistent (#7270)
* Made log lines consistent

* Change log level for process list

* Only show advanced proc info at DEBUG2

* Fixed some more log lines

* Update AppUtilWindows.cpp
2023-07-28 09:45:27 +01:00
7d4a368864 Fix issue with reconnection when server initiate TLS connection. (#7230)
* Restart socket when unknown client connection fails

* Send connected event from client side

Co-authored-by: Serhii Hadzhilov <serhii@symless.com>
2022-10-07 14:16:02 +03:00
0f3e128e17 Add ability to reconnect from server side (#7226)
* Add ability to reconnect from server side

* Fix code smell

Co-authored-by: Serhii Hadzhilov <serhii@symless.com>
2022-10-03 17:08:24 +03:00
95ee948f26 SYNERGY1-1497 Memory leaks in copy/paste and drag and drop functionality (#7175)
* SYNERGY1-1497 Fix memory leak in copy/paste functionality

* SYNERGY1-1497 Memory leaks with function CFStringRefToUTF8String

* SYNERGY1-1497 Fix memory leak in Server::sendDragInfo

* SYNERGY1-1497 Fix memory leak in Server::sendFileToClient

* SYNERGY1-1497 Fix memory leak in Server::sendDragInfoThread

* SYNERGY1-1497 Fix code smells

* SYNERGY1-1497 Fix builds

* SYNERGY1-1497 Fix additional code smells
2022-05-19 18:29:11 +03:00
940e2ecd20 SYNERGY-1287 display language notifications only on client side (#7111)
* SYNERGY-1287 Display language notification only on client side

* SYNERGY-1287 Always show notification on the client side

* Update ChangeLog

* Fix doxygen job
2021-10-21 13:48:40 +03:00
65ec504696 Synergy 1267 endless notifications during connection (#7104)
* SYNERGY-1267 Endless notification during connection

* SYNERGY-1267 Endless notification. Server part

* SYNERGY-1267 Change notification trace level

* Update ChangeLog

* SYNERGY-1267 Fix Linux compilation

* SYNERGY-1267 Fix code smell

* SYNERGY-1267 Add requested changes
2021-10-13 13:01:27 +03:00
e9e21aad8f Synergy 907 client tray language switcher reverts to en (#7038)
* SYNERGY-907 Client tray language switcher reverts to EN
*Fix checkbox spelling

* SYNERGY-907 Client tray language switcher reverts to EN
*Update changelog

* SYNERGY-907 Client tray language switcher reverts to EN
*Temporary disable language sync logic

* SYNERGY-907 client tray language switcher reverts to en
*Update changelog

* Synergy 907 client tray language switcher reverts to en
*Fix sonar

* Synergy 907 client tray language switcher reverts to en
*Fix sonar

* Synergy 907 client tray language switcher reverts to en
*Fix chnagelog

* SYNERGY-907 Client tray language switcher reverts to EN
*Add prototype of keyboard layout names transfer(Windows part)

* SYNERGY-907 Client tray language switcher reverts to EN
*Add keyboard layout determination(Mac part)

* SYNERGY-907 Client tray language switcher reverts to EN
*Add language check on client side

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix Windows build

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Add logs

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Add protocol update

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Add server side of language sync

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Remove unused variables

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*AFix mac language determination

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Clean up logs

* SYNERGY-907 Client tray language switcher reverts to EN
*Replace logs with messagebox on Windows

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Add mac messagebox, revert protocol changes

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Fix minor language bugs

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Update chagelog

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Minor fixes

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Fix Linux build

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Fix sonar code smells

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Fix Linux build

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Add Linux language determination

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Fix sonar codesmells

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Fix sonar codesmells

* SYNERGY-907-Client-tray-language-switcher-reverts-to-EN
*Replace custom xml parser with tinyxml2

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix PR comments

* SYNERGY-907 Client tray language switcher reverts to EN
*Update changelog

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix unix build

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix unix build

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix sonar code smells

* SYNERGY-907 Client tray language switcher reverts to EN
*Update changelog

* SYNERGY-907 Client tray language switcher reverts to EN
*Replace tinuxml with pugixml

* SYNERGY-907 Client tray language switcher reverts to EN
*Add pugixml as a git submodule

* SYNERGY-907 Client tray language switcher reverts to EN
*Add missed files

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix sonar code smells

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix comments from PR

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix sonar code smell

* SYNERGY-907 Client tray language switcher reverts to EN
*add tests for x11 files parser

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix include for unix build

* SYNERGY-907 Client tray language switcher reverts to EN
*Add test coverage for new logic

* SYNERGY-907 Client tray language switcher reverts to EN
*Add test coverage for new logic

* SYNERGY-907 Client tray language switcher reverts to EN
*Add code coverage
*Fix code smells

* SYNERGY-907 Client tray language switcher reverts to EN
*Return missed file

* SYNERGY-907 Client tray language switcher reverts to EN
*Improve code coverage of x11Layouts parser

* SYNERGY-907 Client tray language switcher reverts to EN
*Add client args code coverage

* SYNERGY-907 Client tray language switcher reverts to EN
*Return runtime language sync

* SYNERGY-907 Client tray language switcher reverts to EN
*Return windows current keyboard layout determination

* SYNERGY-907 Client tray language switcher reverts to EN
*Return Linux language determination

* SYNERGY-907 Client tray language switcher reverts to EN
*Remove debug code

* SYNERGY-907 Client tray language switcher reverts to EN
*Move back Carbon current language determination

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix language change for existed languages on iOS and Linux

* SYNERGY-907 Client tray language switcher reverts to EN
*Return protocol missed parameter

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix macOS language change

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix language sync (when it is disabled)

* SYNERGY-907 Client tray language switcher reverts to EN
*Add correct language choosing
*Fix code coverage tests

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix windows build and tests

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix macOS build and tests

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix language change for first letter in keystroke

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix macOS build

* SYNERGY-907 Client tray language switcher reverts to EN
*Partially fix Sonar codesmells

* SYNERGY-907 Client tray language switcher reverts to EN
*Partially fix Sonar codesmells

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix build

* SYNERGY-907 Client tray language switcher reverts to EN
*Added logging for language change process
*Fixed language change process for Windows

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix double layout change in key repeat event

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix determination of current language on windows
*Removed legacy code of restoring language when leaving screen
*Fix double group change on Linux

* SYNERGY-907 Client tray language switcher reverts to EN
*Temp fix for language change on Linux

* SYNERGY-907 Client tray language switcher reverts to EN
*Add XSync to normalize Linux language polling and setting
*Remove setxkbmap using

* SYNERGY-907 Client tray language switcher reverts to EN
*Add keyboard layout changing on Linux with DBus

* SYNERGY-907 Client tray language switcher reverts to EN
*Add comments to new language change function
*Logical fix

* SYNERGY-907 Client tray language switcher reverts to EN
*Remove input attaching

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix language change on macOS

* SYNERGY-907 Fix review issues

* SYNERGY-907 Fix review comment for Windows

* SYNERGY-907 Removed debug trace

Co-authored-by: Andrii Batyiev <andrii-external@symless.com>
Co-authored-by: user <user@users-Mac-mini.local>
Co-authored-by: Serhii Hadzhilov <serhii-external@symless.com>
2021-10-04 18:51:12 +03:00
1a38713ff8 SYNERGY-1089 No notification between clients (#7064)
* SYNERGY-1089 There is no notification if user moves pointer between clients

* SYNERGY-1089 There is no notification if user moves pointer between 2 clients

* Update ChangeLog
2021-08-04 15:12:01 +03:00