Commit Graph

29 Commits

Author SHA1 Message Date
9b1489384c chore: String toHex should return a string not do inplace conversion 2025-01-25 15:43:44 +00:00
ac54a97a3f chore: rm use of "Arch" from "String" 2025-01-25 15:43:44 +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
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
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
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
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
5c2311a50a Remaining SonarCloud Bugs (#6900)
* (WIP)-all issues corrected, tests started

* first test passing

alternative solution for SonarCloud check

fixed for to while translation

added changelog item

adding tests and fixes

more tests; avoid compiling BSD Tests on Windows

attempting a BSD compile patch

more tests

borrowing symbol detection from another test

more ambitious testing

changed the order of assertions for better info

more tests

fixed clear errors before executing

expanding transformation to use string comparison

including terminator on translation count

a different flag for testing MS Windows

differente Windows flag

more tests

fixing platform encoding match

Windows compiler difference on #ifdef

Google Test macro usage fix

test added

added keymap test

test and initialisation fixed

ms cl issue with named init

test for keymap

exercising keystate

more configuration exercises

one more test for config

added Unicode test

an IPv6 test

more portable networking code

using our own platform switching code

avoiding strcpy

* Fixed typo in Changelog.

* +appropriate memory handling

* one more test for coverage

* a tad more coverage

* expanded test on Config

Co-authored-by: Max <maxmommersteeg@hotmail.com>
Co-authored-by: SerhiiGadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com>
2021-01-15 13:24:31 +02:00
46231cd35c #6037 Slightly improve error checking in vformat() 2017-05-12 00:45:59 +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
d429988e73 Add more unit tests for split string function #4933 2015-10-29 13:00:03 -07:00
72397137c0 Add split string function #4933 2015-10-29 12:52:55 -07:00
2c74a7f5c1 Added stringToSizeType and its unittest #4601 2015-05-19 14:23:43 -07:00
70be9cd97f Refactored intToString #4601 2015-05-18 11:27:54 -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
28eb85660f Fixed error from merge 2015-04-14 17:51:41 +01:00
39e183da3e Refactored string operations
Conflicts:
	src/lib/base/String.cpp
2015-04-14 17:51:19 +01:00
141b778477 refactored SecureSocket to use interface #4313 2015-01-14 17:25:53 +00:00
1d7eb3f5cb updated pluging loader for Windows #4313 2015-01-09 13:46:35 +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
e34e39a41c fixed XArchEvalUnix using wrong memeber, string_format using c++11 (which we're not ready for yet), code style (indentation and new lines) 2014-03-20 13:34:21 +00:00
44a98c6c9d fixed: XArchEval "what" returns garbage (memory deleted). 2014-03-20 10:32:40 +00:00
28a6b16875 fixed: Bug #3933 - Plus signs in the email address cause premium login to fail 2014-03-14 20:34:19 +00:00