Commit Graph

37 Commits

Author SHA1 Message Date
3c86d9dc83 chore: rename lib/common/constants.h.in => lib/common/Constants.h.in 2025-03-20 13:06:45 +00:00
0138372871 chore: rename lib/base/log_outputters => lib/base/LogOutputters 2025-03-20 13:06:45 +00:00
890fd61e6e refactor: Move ownership of Windows daemon file log outputter to Log 2025-02-28 17:58:16 +00:00
f56a3ba305 refactor: Rename param for Log::insert to make adoption clearer 2025-02-28 12:57:15 +00:00
0bca094fce chore: Explain use of new for all log outputters 2025-02-28 12:57:15 +00: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
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
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
321418fcf8 Improve handling of Qt-related warnings and errors (#7431)
* Load .env from app dir

* Use `OutputDebugStringA` on Windows

* Improved string manipulation in logger and better use of OutputDebugStringA

* Use noquote for path

* Apply TLS setting after activation

* Restart after activation

* Move skip debug message to correct place

* Only print settings path on create, not shown

* Merge common and global libs

* Reduce code duplication around constants, version, etc

* Simplify sprintf code

* Use snprintf

* Add error test menu

* Coverage for dotenv

* Coverage for Logger

* Add missing include

* Add init when no Git SHA

* Update ChangeLog

* Add spellings

* Set debugging on for release build

* Remove unused variable

* Remove bad comment

* Fixed copyright date

* Remove import

* Move URL const back to GUI

* Remove dead code and duplication

* Fixed/ignored lint warnings
2024-08-09 14:03:48 +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
9bb458bff2 Clickable debug source paths and new launch target (#7335)
* Add rebuild launch target for daemon

* Change debug source path to be clickable in VS Code

* Shorten launch targets for readability in UI

* Update CL
2024-01-24 16:02:07 +00:00
ab8a7b5ed4 add missing <cstdint> includes for SIZE_MAX (#7237)
Without the change the build on upcoming `gcc-13` ails as:

    src/lib/base/Log.cpp: In member function 'void Log::print(const char*, int, const char*, ...)':
    src/lib/base/Log.cpp:128:23:
      error: 'SIZE_MAX' was not declared in this scope
      128 |     if ((strnlen(fmt, SIZE_MAX) > 2) && (fmt[0] == '%' && fmt[1] == 'z')) {
          |                       ^~~~~~~~
    src/lib/base/Log.cpp:30:1:
      note: 'SIZE_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
       29 | #include <ctime>
      +++ |+#include <cstdint>
       30 |

gcc-13 cleaned it's header dependencies and that exposes these failures.
2022-12-08 11:16:44 +02:00
c7fd0a8e4d SYNERGY-956 - Resolve code scanning issues (#7006)
* SYNERGY-956 - Resolve code scanning issues

* SYNERGY-956 - Update changelog

* SYNERGY-956 - Platform based localtime

* SYNERGY-956 - Fix argument order

Co-authored-by: SerhiiGadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com>
2021-05-26 12:39:40 +03:00
4d99707e93 SYNERGY-511 SonarCloud security hotspots in Synergy-core (#6972)
* SYNERGY-511 SonarCloud security hotspots in Synergy-core
* Test commit to check sonar reaction

* SYNERGY-511 SonarCloud security hotspots in Synergy-core
* Update changelog
* Supress unsafe strcpy for SonarCloud

* SYNERGY-511 SonarCloud security hotspots in Synergy-core
* Fix all SonarCloud security hotspots

* SYNERGY-511 SonarCloud security hotspots in Synergy-core
* Fix SonarCloud code smells

* SYNERGY-511 SonarCloud security hotspots in Synergy-core
* Fix missed size in memcpy for C-style string

* SYNERGY-511 SonarCloud security hotspots in Synergy-core
* Return unsafe http as domain adress

Co-authored-by: Andrii Batyiev <andrii-external@symless.com>
Co-authored-by: SerhiiGadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com>
2021-04-06 13:54:25 +03:00
a21606664d #6753 Updated missed sprintf 2020-08-25 20:10:51 +01:00
539da69a34 #6753 Replaced vulnerable sprintf calls with snprintf 2020-08-25 19:16:21 +01:00
568a008037 #6382 Add helpful comment about DCMAKE_BUILD_TYPE and logging 2018-08-02 14:11:05 +01:00
8dc868a206 #6380 Fixed warnings for VS2017 2018-08-01 13:03:41 +01:00
deea23f866 Apply tab to spaces filter to src folder 2017-02-07 01:24:59 +00:00
c3c0913633 Update company copyright notice 2016-09-26 11:58:33 +01:00
83c0dea2e4 #4792 Calculated log message size rather than using fixed size 2016-08-08 14:36:43 +01:00
d2c94bfb04 Revert "Removed mutex locking from get and set of log level #4809"
This reverts commit 3eef49d5c9.
2015-08-06 12:57:57 -07:00
485547d6ea Reverted Notify back to note #4855 2015-07-31 13:20:35 -07:00
260a7337d3 Added timestamp in log #4845 2015-07-06 15:50:21 -07:00
3aebb87b37 Fixed using old log level convention #4745 2015-06-25 11:25:58 -07:00
3eef49d5c9 Removed mutex locking from get and set of log level #4809 2015-06-18 14:18:05 -07:00
d71304ee55 Modified header of every file COPYING to LICENSE
Modified to match the updated name of the license file
2015-05-06 22:12:44 -04:00
141b778477 refactored SecureSocket to use interface #4313 2015-01-14 17:25:53 +00:00
41d6080028 changed company name in copyright notice 2014-11-11 13:52:03 +00:00
e8e156f0e2 dropped "c" prefix from class names 2014-11-11 13:51:47 +00:00
0745d5884b Task #3969 - Merge String.cpp and StringUtil.cpp 2014-03-21 08:32:36 +00:00
77eae25279 fixed code style in Log.cpp 2014-03-14 16:04:21 +00:00
54b14c439d removed unused variables 2014-03-14 16:03:15 +00:00
4675f29a4c code style fixes:
- reordered includes to prevent accidental dependencies.
- moved arch specific files into their own folder (easier to include with cmake).
- renamed non-class files to reflect new code style (lower case with underscores).
- using full relative paths for includes (easier for understanding dependencies).
- using #pragma once instead of classic-style header guards.
2014-02-28 12:36:45 +00:00
8e74710dad code style: dropped C prefix 2014-02-27 17:45:17 +00:00