Skip to content

Use QStringLiteral more liberally when possible.#33

Merged
vadi2 merged 1 commit intoMudlet:developmentfrom
ahmedcharles:qstringliteral
Aug 13, 2014
Merged

Use QStringLiteral more liberally when possible.#33
vadi2 merged 1 commit intoMudlet:developmentfrom
ahmedcharles:qstringliteral

Conversation

@ahmedcharles
Copy link
Copy Markdown
Contributor

In most places where an Icon is specified a fixed QString that refers too
the location in the resource file is needed. QStringLiteral() is a macro
that allows the implict conversion from const char to a QString to be done
at compile time rather than run-time. Also the result can be stored in
read only memory. Also it helps to explicitly mark a string that is NOT
to be translated by tr() which will help in the future if we ever attempt
to translate Mudlet into languages other than en-US (yippee - as an
Englishman I won't have to put up with color rather than colour
everywhere!) If anyone is brave enough to set the
Q_NO_CAST_FROM_ASCII/Q_NO_CAST_TO_ASCII macros they will get to see how
many strings will have to be either wrapped in QStringLiteral or tr() -
not counting error messages in the Lua stuff in std::string form that will
have to be redone into QString until the point of conversion to/from utf-8
into or out of the Lua subsystem so that it can also be translated!!!

In most places where an Icon is specified a fixed QString that refers too
the location in the resource file is needed.  QStringLiteral() is a macro
that allows the implict conversion from const char to a QString to be done
at compile time rather than run-time.  Also the result can be stored in
read only memory.  Also it helps to explicitly mark a string that is NOT
to be translated by tr() which will help in the future if we ever attempt
to translate Mudlet into languages other than en-US (yippee - as an
Englishman I won't have to put up with color rather than colour
everywhere!)  If anyone is brave enough to set the
Q_NO_CAST_FROM_ASCII/Q_NO_CAST_TO_ASCII macros they will get to see how
many strings will have to be either wrapped in QStringLiteral or tr() -
not counting error messages in the Lua stuff in std::string form that will
have to be redone into QString until the point of conversion to/from utf-8
into or out of the Lua subsystem so that it can also be translated!!!
vadi2 added a commit that referenced this pull request Aug 13, 2014
Use QStringLiteral more liberally when possible.
@vadi2 vadi2 merged commit db399a3 into Mudlet:development Aug 13, 2014
@ahmedcharles ahmedcharles deleted the qstringliteral branch August 14, 2014 01:08
vadi2 pushed a commit that referenced this pull request Apr 20, 2020
* Add link information against libdl.so as well

* Remove (harmful?) lua library path definition
vadi2 added a commit that referenced this pull request Apr 21, 2020
* Add a Ubuntu build

* Install homebrew dependencies only on macOS

* Add Linux dependencies separate

* Don't stop other builds on fail

* Install libzip-dev on Linux

* Sudo please

* Try installing libglu1-mesa-dev

* Install Pulse dev libraries

* Add a workaround for Lua linking

* Correct YAML

* Back to a single line

* Debug locations of libraries

* Correct an extra /

* Build Mudlet with tracing

* Try -GNinja Multi-Config

* Try not specifying a generator

* Add link information against libdl.so as well (#33)

* Add link information against libdl.so as well

* Remove (harmful?) lua library path definition

* Show built output in the end

* Added a run tests flag

* Try appending gcc argument as well

* Debug plugin loading

* Use a single, generic compiler line

* Remove the x's

* Install libxkbcommon-x11-0

* Try launching Achaea profile

* Finalise Linux CI build

* Remove comment

Co-authored-by: keneanung <keneanung@googlemail.com>
vadi2 added a commit that referenced this pull request Sep 30, 2021
* Add a Ubuntu build

* Install homebrew dependencies only on macOS

* Add Linux dependencies separate

* Don't stop other builds on fail

* Install libzip-dev on Linux

* Sudo please

* Try installing libglu1-mesa-dev

* Install Pulse dev libraries

* Add a workaround for Lua linking

* Correct YAML

* Back to a single line

* Debug locations of libraries

* Correct an extra /

* Build Mudlet with tracing

* Try -GNinja Multi-Config

* Try not specifying a generator

* Add link information against libdl.so as well (#33)

* Add link information against libdl.so as well

* Remove (harmful?) lua library path definition

* Show built output in the end

* Added a run tests flag

* Try appending gcc argument as well

* Debug plugin loading

* Use a single, generic compiler line

* Remove the x's

* Install libxkbcommon-x11-0

* Try launching Achaea profile

* Update .github/workflows/build-mudlet.yml

Co-authored-by: Damian Monogue <3660+demonnic@users.noreply.github.com>

* Try taking a screenshot of what's running

* Fix YAML syntax

* Clarify the step name

* Take a screenshot even on build 'time out'

* Install imagemagick

* Fix whitespaces

* Upgrade to latest 1.5 of the xvfb action

* Pre-set environment variables to be used

* Increase the timeout

* Run with the self-test profile

* Re-enable mudlet.org's connection info

* Mock test runs

* Add an installing debug echo

* Debug with tmate

* Show error when script couldn't be loaded

* Print all script compile errors

* Setup tmate at the end

* Add debug echoes

* Move Mudlet to the right location

* Split out packaging steps

* Cleanup

* Auto-run tests

* Install busted as well

* Fix setup() call

* Log everything sent to all consoles

* Actually log everything printed

* Pass in the test location

* Comment out a crash

* Tidier console print message

* Echo cleanup

* Better echo style

* Wrap closeMudlet in a timer to avoid a crash

* Comment out mSpellDic crash as well

* Set environment variable when test failed

* Fail workflow when tests fail

* Write to GITHUB_ENV properly

* Add setEnv

* Make use of setEnv

* Launch tmate

* Write to file instead

* Add comments

* Improve error message

* Remove tmate

* Fix merge error

* Add the new --mirror option

* Don't deploy Windows builds

* Only check Lua tests when we need to

* Update job name

* Remove unusued setEnv

Co-authored-by: keneanung <keneanung@googlemail.com>
Co-authored-by: Damian Monogue <3660+demonnic@users.noreply.github.com>
Chris7 pushed a commit to Chris7/Mudlet that referenced this pull request Jan 2, 2022
* Add a Ubuntu build

* Install homebrew dependencies only on macOS

* Add Linux dependencies separate

* Don't stop other builds on fail

* Install libzip-dev on Linux

* Sudo please

* Try installing libglu1-mesa-dev

* Install Pulse dev libraries

* Add a workaround for Lua linking

* Correct YAML

* Back to a single line

* Debug locations of libraries

* Correct an extra /

* Build Mudlet with tracing

* Try -GNinja Multi-Config

* Try not specifying a generator

* Add link information against libdl.so as well (Mudlet#33)

* Add link information against libdl.so as well

* Remove (harmful?) lua library path definition

* Show built output in the end

* Added a run tests flag

* Try appending gcc argument as well

* Debug plugin loading

* Use a single, generic compiler line

* Remove the x's

* Install libxkbcommon-x11-0

* Try launching Achaea profile

* Finalise Linux CI build

* Remove comment

Co-authored-by: keneanung <keneanung@googlemail.com>
mehulmathur16 pushed a commit to mehulmathur16/Mudlet that referenced this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants