Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance: enable builds in a full Windows MSYS2 environment #3889

Merged
merged 15 commits into from
Aug 25, 2020

Conversation

SlySven
Copy link
Member

@SlySven SlySven commented Jun 12, 2020

By defining WITH_MAIN_BUILD_SYSTEM to the value NO this PR makes enough changes to the qmake project file to enable Mudlet to be compiled in a full MSYS2 development environment (in the MSYS2 Qt Creator) - this will enable easier development by Windows users (particularly those who also have some familiarity with *nix systems) as I have documented at:
Compiling on Windows 7+ (MSYS2_Alternative).

It also makes some changes to the setting up of the LUA package paths for the lua code formatter so that the paths are all entered with Unix style directory separators but converted to whatever the Lua package handler is set to use. In a Windows environment it is not unheard of to get both '\' and '/' being used within the same path as different parts get generated in stages - and using the backslash one can produce surprising error messages if the back slash is not properly escaped when displaying those messages in the main console or elsewhere (they disappear entirely or end up escaping following characters producing misleading information).

Edit: although intended originally just for QMake on Windows - a need to consider an additional library (for a crash handler) that only had a CMake build system prompted me to also consider and try to fix things to handle the CMake case - which had not been used for Windows for some years - as well...

Signed-off-by: Stephen Lyons slysven@virginmedia.com

By defining `WITH_MAIN_BUILD_SYSTEM` to the value `NO` this PR makes enough
changes to the qmake project file to enable Mudlet to be compiled in a full
MSYS2 development environment (in the MSYS2 Qt Creator) - this will enable
easier development by Windows users (particularly those who also have some
familiarity with *nix systems) as I have documented at:
"Compiling on Windows 7+ (MSYS2_Alternative)" but it seems that the URL is
causing GitHub to forget about the PR as it seems to push and is recorded
in my local repository but never actually lands there!

It also makes some changes to the setting up of the LUA package paths for
the lua code formatter so that the paths are all entered with Unix style
directory separators but converted to whatever the Lua package handler is
set to use. In a Windows environment it is not unheard of to get both '\'
and '/' being used within the same path as different parts get generated
in stages - and using the backslash one can produce surprising error
messages if the back slash is not properly escaped when displaying those
messages in the main console or elsewhere (they dissappear entirely or
end up escaping following characters producing misleading information).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@add-deployment-links
Copy link

add-deployment-links bot commented Jun 12, 2020

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

Needed to import fix for CI build failures on Travis MacOs

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@keneanung
Copy link
Member

/refresh links

@vadi2
Copy link
Member

vadi2 commented Jun 16, 2020

None of us on the team know MSYS2 and I don't see and willpower to learn it either in order to do support and bugfixing - if we put it in, I think it should be unofficial like FreeBSD.

src/mudlet.pro Outdated Show resolved Hide resolved
BugFix: fix a typo in qmake project file.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@SlySven
Copy link
Member Author

SlySven commented Jun 17, 2020

Well you are already installing and using Mingw/MSYS things but that is a little suspect in IMHO as they just do not offer a 64-bit path in the future and actually could clash with the limited Mingw-w64 (32-bit parts) that Qt does ship in their Windows Qt SDK!

What this PR does is allow some things to be changed so that qmake will work in either the existing case or a full MSYS2/Mingw-w64 one - so the CI process here is actually checking that I haven't balls-ed up anything for the existing case. The other part of this PR revises the path handling - particularly for the external Lua stuff so that the requisite files can be found at run-time. For instance, until this PR I realised that the Lua code formatter may not work for MacOs builds of Mudlet in a development environment - as AFAICT it ONLY looked in the resource bundle for it - which as someone hacking the source code on that platform is not going to have...!

Copy link
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initIndenterGlobals() was ~60 lines when I added it, and it is now 2x the size without much gained functionality. The amount of commenting you're adding is not OK - gotta be considerate of others using this code too.

Please trim the comments. They are not helping, they are hurting.

*/
#if defined(LUA_DEFAULT_PATH)
if (!QStringLiteral(LUA_DEFAULT_PATH).isEmpty()) {
luaL_dostring(pIndenterState.get(), QStringLiteral("package.path = [["
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be duplicated except it prepends LUA_DEFAULT_PATH if it exists - can be written better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be duplicated except it prepends LUA_DEFAULT_PATH if it exists ...

Sort of, it prepends LUA_DEFAULT_PATH if it exists and is not an empty string.

... can be written better.

How so?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes just append the string if it's there.

I've looked the code and the function is now absolutely massive with a tangle of #ifdefs that make the logic really hard to follow and huge comments you have to read. That is not maintainable, we can't have this - we need to have code that everyone finds nice & pleasant to work with.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes just append the string if it's there.

That won't work, if the variable is defined but is an empty string then it will cause the path to have /?.lua included which means look for it in the root directory - on most OSes that location is readable but not writeable for normal users. If you refer back to #1616 you will note part of the problems there was that LUA_DEFAULT_PATH was getting defined but not set to anything - and that is very hard to detect in the C/C++ preprocessor and cannot be done cleanly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check can be done at runtime as far as I can see just fine and we'll have much simpler code, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well it eliminated some preprocessor conditional lines and still seems to work so: I guess so.

Fix an addition to the `package.cpath` which would not have worked as it
did not specify the file extension which is OS dependent.

Also remove LuaJIT remenent, which we dropped support for a long time back.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@SlySven
Copy link
Member Author

SlySven commented Jun 25, 2020

I've tried to trim down the main big comment and removed the similar duplicate for the Windows case by instead using numbers and appending them to the relevant lines. Is that good enough for something that is quite OS dependent.


#if defined(Q_OS_LINUX)
// if using LuaJIT, adjust the cpath to look in /usr/lib as well - it doesn't by default
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the removal of the LuaJIT stuff following a recent, brief discussion we had about it on Discord!

* directory two parent directories up:
* 1 installed *nix case - probably not applicable to Windows
* "LUA_DEFAULT_PATH/?.lua" (if defined and not empty)
* 2 AppImage (subdirectory of executable):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops - comment should be actual directory of the executable.

src/TLuaInterpreter.cpp Outdated Show resolved Hide resolved
Revise: fix an error in a comment.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
…out it

I was a bit sceptical at first but it *seems* to work.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Copy link
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's looking better 😀 @demonnic would you mind reviewing the changes for readability as well?

Copy link
Member

@demonnic demonnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like there is a lot of repeated code here and this should be refactored to keep it DRY, as it currently stands it's more tech debt than supporting MSYS2 for one or two users is worth.

//AppInstaller on Linux would like the search path to also be set to the current binary directory
luaL_dostring(pGlobalLua, QString("package.cpath = package.cpath .. ';%1/lib/?.so'").arg(QCoreApplication::applicationDirPath()).toUtf8().constData());
#elif defined(Q_OS_MAC)
//macOS app bundle would like the search path to also be set to the current binary directory
luaL_dostring(pGlobalLua, QString("package.cpath = package.cpath .. ';%1/?.so'").arg(QCoreApplication::applicationDirPath()).toUtf8().constData());
luaL_dostring(pGlobalLua, QString("package.path = package.path .. ';%1/?.lua'").arg(QCoreApplication::applicationDirPath()).toUtf8().constData());
#elif defined(Q_OS_WIN32)
// The following is only needed in the original powershell script based Mudlet
// build environment - and should probably have been done via the LUA_CPATH
// environmental variable:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why not fix that instead of making it a comment and adding another ifdef?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I do not want to force changes in other things (a build system using PowerShell which I do not grok) which might break them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new comment is wrong, this is needed when you're running Mudlet in WIndows using the setup script. I recommend removing the comment as it's adding little value.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new comment is wrong, this is needed when you're running Mudlet in WIndows using the setup script.

That is what I was saying and is how the logic is setup - so your remark doesn't compute. I called it "the original powershell script" you call it " in WIndows using the setup script" but we mean the same thing - don't we?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry, we're talking about the same thing - and no it should not be done via LUA_CPATH. This setup is just fine as well. This comment needs to go, code is not a place for personal contemplations.

.arg(QCoreApplication::applicationDirPath()).toUtf8().constData());
} else {
luaL_dostring(pIndenterState.get(), QStringLiteral("package.path = [["
"%1/?.lua;" // 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of this section is reproduced code. Instead of two big repeated sections, why not do the push of the LUA_DEFAULT_PATH in the if, and then push the rest of them outside of the if/else and also keep it DRY.

If the existing package.path absolutely must be behind all of it, then create the string first and then adjust package.path. But this huge repeated block is not only an eyesore, it's just begging for someone to miss an update in one or the other of them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I've tried a different approach - is that better now?

* NOTE: In the cmake case the shadow build directory is alongside the base
* directory of the extracted source package so it MUST be extracted into
* a known directory name which is assumed here to be "mudlet"!
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a case of too much information, I think. We don't need to explain how lua require() works in our C++ files complete with example. This beast of a file is already 17k+ lines long, we don't need to make it even harder for our editors to open.

As for delineating each case, I can see an argument for this but I feel like the right place to do it is above each entry when you add it. Which will be made easier if you take my suggestion to keep the code DRY below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had it about each line in each case - twice (one for *nix like cases and once for Windows) - and Vadim said I should cut it down. As for explaining each entry it took a far bit of research/hackery to work out why each line was needed and I don't want that information lost. For instance for CMake shadow (out-of-source, the default these days) builds it is essential to extract the mudlet source into a directory called, not surprisingly, "mudlet" - but that is not obvious!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The middle of a 17,000 long file is definitely not the right place to have this information.

Copy link
Member Author

@SlySven SlySven Jul 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also:

We don't need to explain how lua require() works in our C++ files complete with example.

We need to explain it somewhere - it took me a while to workout that the '.'s in that require had significance and if I had had that explanation when I first tried porting Mudlet to both MSYS2 AND FreeBSD it would have made things go a lot smoother and without the head scratching around: WTF is base.lua and why is it that that file is being sought?! Given that this is the code that is looking for it it seems a perfectly logical place to say what it is looking for. Remember, I am primarily a C/C++ coder not a Lua one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's explained in the Lua manual - part of the learning process. No Mudlet dev should have personal comments in the codebase, it's shared by all!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is nothing about that that is a personal comment? Where are you forming that opinion from? 😕

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well - I don't think others find it helpful, certainly me and demonnic don't. I think you'd be the only one to benefit from it.

If there's already a proper manual explaining something, we shouldn't duplicate it inside Mudlet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to go as well, this explanation is not necessary. If you'd like to record for yourself how the loader works, it's best to do it elsewhere - because forcing everyone to read 6 line explanation of how loading of just one particular module we use isn't nice to the team. And it's forced because comments are meant to be read - if we start ignoring comments by habit because they're long and not useful, that will be a bad situation!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some explanation is necessary IMHO!

I have shorted it to three lines and included a link to a very informative SE QA - some of the details there (about '.'s being used as directory separators - do not even get mentioned in the PIL 5.1 manual) - which is why I felt it necessary to put something in for those of us who are NOT Lua gurus...!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't think it's helpful. You'll be looking at the Lua manual anyway to learn it. There is no added value by putting it here, except making everyone read it, and not everyone wants to read this. 😕

}

#if ! defined (Q_OS_MACOS)
// AppInstaller on Linux would like the search path for the binary modules
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really have to split this to two lines? it seemed perfectly fine on one line before and I doubt anyone is trying to edit this on an 80 character terminal these days.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a pain having long lines if one is using a side-by-side split view (useful if comparing similar blocks of code in two different places {ideally to see if there is scope for refactoring to a new function}) as I often do when editing in Qt Creator.

As a guide I tend to enable a (80 column wide) visible margin in the IDE.

end)LUA");
// clang-format on

if (!QStringLiteral(LUA_DEFAULT_PATH).isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this exactly the same thing as above, apart from the toNativeSeparators function? Why not define the function so it handles both unix and windows variants, and then do this one time using the function? We don't need to make this super performant, it happens one time on startup. Keeping the code DRY would make it MUCH more maintainable and a lot less frustrating to read in future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need it for non-Windows OSes because they do not - as far as I understand it - tend to use anything other than /as the second element of package.config which is the directory separator that the Lua package handler uses. This PR is trying to ease in handling alternatives for the Windows case but without changing unnecessary things for the other OS. OTOH it might be simpler to have less variations. I will take another look.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, no, it does not have the number 2 entry.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not about 'does unix need it' it's about 'do we need to maintain this in multiple locations' and the answer is 'no, we do not'

Does having case 2 in the package.path in the below case cause issues? If so, does it need to be in position 2 for everything else? If not, shove it at the end of the string you're assembling before modifying package.path.

But I'm pretty confident the answer isn't a bunch of otherwise repeated code we have to maintain if something changes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a go at simplifying things now - does it look any better now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, thank you =)
I still think the comments are perhaps a bit much, but the package.path/cpath stuff no longer sets off that twitch in my eye ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They will help in the future when some poor soul is trying to work out why the files won't load on their OS - even though they think they have the right files in the right place - I had to jiggle things around to get the LCF working on FreeBSD as I recall...

... and actually the revision has made the code a bit easier to fix if something changes in the future.

As for your eye twitch - remember: "In the country of the blind, the one-eye man will be king!" 😜

@@ -17295,7 +17365,7 @@ void TLuaInterpreter::loadGlobal()
qt_ntfs_permission_lookup++;
#endif
if (!(QFileInfo(pathFileName).isReadable())) {
failedMessages << tr("%1 (isn't a readable file or symlink to a readable file)", "This is not a file or a symbolic link to a file").arg(pathFileName);
failedMessages << tr("%1 (isn't a readable file or symlink to a readable file)", "This is not a file or a symbolic link to a readable (for this user) file").arg(pathFileName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this is more specificity than is needed and is more likely to confuse the issue than help most people.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is only going to show if there is a problem - and if there is a problem it helps to know as much detail as we can reasonable establish - in this case that there is something there but it isn't a file or symlink to a file we can read...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. To be honest "This is not a file or a symbolic link to a readable (for this user) file" makes little sense when you read it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, it is a comment for the translators not a UI text. I suppose I could cut it out entirely and let them work it out from the Engineering text...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It basically repeats the first text, not adding any more information

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean: "the explanation text for the translators does not add any more information compared to the source text"? Well it does explicitly point out that the problem is likely to be permissions (read-permissions for this user") - I do not have the source open around this - but - IIRC - there is a prior test that checks for the existence of the file prior to this check that the user can read it...

src/mudlet.pro Outdated
@@ -204,6 +204,18 @@ isEmpty( OWN_QTKEYCHAIN_TEST ) | !equals( OWN_QTKEYCHAIN_TEST, "NO" ) {
DEFINES += INCLUDE_OWN_QT5_KEYCHAIN
}

########## Full MSYS2 (alternative Windows build) environment support ##########
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You already have a wiki link in here for documentation, perhaps all this extra info could be put on the wiki as well? This could be a link to the wiki and a mention that it can be enabled using WITH_MAIN_BUILD_SYSTEM="NO"

Copy link
Member Author

@SlySven SlySven Jul 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know about other people but if I am hacking around in an unfamiliar project I want the configuration details to hand in the file I am looking through looking for clues - and not go looking for on-line reference material which has been forgotten. Fair enough that shouldn't happen here but it is a lot simpler to document stuff here as I need to and then perhaps migrate it to an external reference (Wiki) when it is a bit more stable...

... OTOH I will think about it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have thought about it and my opinion is that the text present says:

  • that it is only relevant for Windows developers
  • that there is more information in the Wiki
  • that it changes some paths and filenames
  • that to enable it you need to set an environmental variable

It doesn't strike me that any of that is unhelpful to have there or that it is unduly verbose. What alternative text would you consider acceptable instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wiki link clearly states it is windows, and MSYS2. You could just as easily convey this information as

# Windows MSYS2 builds require some altered paths
# see https://wiki.mudlet.org/w/Compiling_Mudlet#Compiling_on_Windows_7.2B_.28MSYS2_Alternative.29
# enable using WITH_MAIN_BUILD_SYSTEM="NO"

Half the lines, all the relevant information, and the link to the wiki for further information. You're not necessarily meant to be having a friendly chat over coffee with every future developer who comes across your comments

Revise a Mudlet specific CMake macro to not include the word "module" as
that is not appropriate for all usages now.

Fix an obscure CMake build error caused by the use of:
`LIBRARYNAME::LIBRARYNAME` in `target_link_libraries(...)` which is the
form for an interface usage of a library - this causes a failure of the
build with an error message of the form:
`src/CMakeFiles/mudlet.dir/build.make:1954: *** target pattern contains
no '%'.  Stop.` that line is actually one about one of the libraries
concerned - and it is the first one which shows up in that file with a
LIBRARYNAME-NOTFOUND entry. The fix seems to be to use only a LIBRARYNAME
form.

Fix a problem in `(static QString) mudlet::getShortPathName(const QString&
name)` which is cause by a Windows specific function that takes.returns
template/typedef type arguments which only work if the symbols
`UNICODE` and `_UNICODE` to be defined and which aren't in an MSYS2/
Mingw-w64 environment.

Revise some usages of the APP_BUILD defined value so that they are
handled correctly (using `QStringLiteral`/`QByteArray` wrapppers).

Change the CMake find module for Pugixml so that it uses a variable name in
ALL_UPPER_CASE to remove a developer warning about using a mixed case one.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@SlySven SlySven changed the title Enhance: enable builds in a full Windows MSYS2 environment (QMake only) Enhance: enable builds in a full Windows MSYS2 environment Jul 5, 2020
I thought something needed to be more conditional than it was but didn't
get it undone in last commit.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Peer-review suggested I needed to shrink the code.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@SlySven
Copy link
Member Author

SlySven commented Aug 7, 2020

Just to reiterate - the point of this PR is to make it simpler to setup a coherent Windows SDK to build both 32 and 64 bit Mudlet applications.

Whilst the existing setup PS script might be fine for some, others (like myself) find the MSYS2/Mingw-w64 SDK a more robust environment as it is provides the libraries and tools all built with the same toolchains and which handles both bit-nesses - which the current Windows offering cannot (IMHO).

Also, it is relatively painless to produce builds that can be debugged interactively which is something that is, I think, problematic with the existing system.

I think that this PR should be enough to enable myself and other interested parties to make contributions to the Mudlet project from Windows - and until it goes in it is a right faff for me to investigate other Windows specific issues because I have to resort to cherry-picking commits for those issues on-top of a branch like this instead of the mainline development one! 😱

FTR - to use this all that should be needed is to define the following two environmental variables (which I stick in the relevant section of the project build page in Qt Creator) to something like:

MINGW_BASE_DIR=C:/msys64/mingw64
WITH_MAIN_BUILD_SYSTEM=NO

far enough it may also be desirable/needed to do some clean-up of the PATH variable that is used before calling qtcreator & from a MING32 (Edit: that is a GUI process so must be run from a MINGW64 or MINGW32 environment) or MINGW64 shell and to also create/revises the LUA_PATHand LUA_CPATH environmental variables to include the user specific luarocks directories but those are not insurmountable issues.

@vadi2 vadi2 self-requested a review August 13, 2020 07:04
Copy link
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looking alright with me now - will leave it up to demonnic and keneanung to review this as well.

@SlySven
Copy link
Member Author

SlySven commented Aug 13, 2020

@vadi2 it looks like I will not be able to merge until you and @keneanung are happy that the changes you have both requested are done. If you both (or perhaps just he) can refresh me on the sticking points maybe we can work them out... 🙏

@vadi2
Copy link
Member

vadi2 commented Aug 13, 2020

I'm good, just @keneanung is outstanding

Copy link
Member

@keneanung keneanung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not happy with some of the CMake changes. I also added https://github.com/Mudlet/Mudlet/pull/3889/files#r475469677 but hit the wrong button 🙈

@@ -407,6 +421,16 @@ if(USE_VARIABLE_SPLASH_SCREEN)
target_compile_definitions(mudlet PRIVATE INCLUDE_VARIABLE_SPLASH_SCREEN)
endif()

if(WIN32)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this block extra and not combined with the WIN32 block below?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

# (QString) mudlet::getShortPathName(const QString& name) work:
target_compile_definitions(mudlet PRIVATE INCLUDE_MAIN_BUILD_SYSTEM UNICODE _UNICODE)
else()
target_compile_definitions(mudlet PRIVATE UNICODE _UNICODE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be outside the MAIN_BUILD_SYSTEM-if. Repeated calls to the function append compile definitions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... done.

Copy link
Member

@keneanung keneanung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy now with the cmake issue resolved (though others might want to cast a second pair of eyeballs over my changes).

@vadi2 vadi2 merged commit 2a90a8a into Mudlet:development Aug 25, 2020
@vadi2
Copy link
Member

vadi2 commented Aug 25, 2020

@SlySven can 64bit builds be enabled in appveyor now?

@SlySven
Copy link
Member Author

SlySven commented Aug 27, 2020

Nope - not yet - this just does the changes needed to build something locally on Windows. I need to revisit #3255 and review the part (that I left out of this one) that builds an archive (zip) file containing the mudlet.exe file and all the MSYS2 / Mingw-w64/ Qt / other libraries (and our Lua support files) that can be plonked into a Windows (either a 32 or a 64 bit one) PC without an MSYS2 / Mingw-w64 installation but still run.

The system I had cobbled together were some bash scripts (I really detest PowerShell and I could do everything without it) - though I had only got as far as that single archive (which I arranged to be placed in a separate ./package sub-directory) - I had not decoded the mechanism that converted that into an installable product. Also, I had left in the WITH_UPDATER environmental variable set to NO because it is not clear how to set up a separate 64-Bit as well as a 32-Bit updater channel for Windows.

@SlySven
Copy link
Member Author

SlySven commented Aug 27, 2020

BTW thanks @keneanung for working out the FindXXXX stuff - it really went over my head. Sadly, I thought it might give me a hint how to get CMake builds working on FreeBSD - but that is still failing for me in the QtKeyChain additional libraries needing to be linked to that - both with the bundled one AND the system one (that FreeBSD has) - the failed linking step for the latter ending:

[ 85%] Linking CXX executable mudlet
cd /home/stephen/src/mudlet/build-mudlet-Desktop_Qt_5_13_2_CMake_Clang_9_0_0-Debug/src && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/mudlet.dir/link.txt --verbose=1
ccache /usr/local/llvm90/bin/clang-9  -g   CMakeFiles/mudlet.dir/mudlet_autogen/mocs_compilation.cpp.o CMakeFiles/mudlet.dir/ActionUnit.cpp.o CMakeFiles/mudlet.dir/AliasUnit.cpp.o CMakeFiles/mudlet.dir/ctelnet.cpp.o CMakeFiles/mudlet.dir/discord.cpp.o CMakeFiles/mudlet.dir/dlgAboutDialog.cpp.o CMakeFiles/mudlet.dir/dlgActionMainArea.cpp.o CMakeFiles/mudlet.dir/dlgAliasMainArea.cpp.o CMakeFiles/mudlet.dir/dlgColorTrigger.cpp.o CMakeFiles/mudlet.dir/dlgComposer.cpp.o CMakeFiles/mudlet.dir/dlgConnectionProfiles.cpp.o CMakeFiles/mudlet.dir/dlgIRC.cpp.o CMakeFiles/mudlet.dir/dlgKeysMainArea.cpp.o CMakeFiles/mudlet.dir/dlgMapper.cpp.o CMakeFiles/mudlet.dir/dlgNotepad.cpp.o CMakeFiles/mudlet.dir/dlgPackageExporter.cpp.o CMakeFiles/mudlet.dir/dlgProfilePreferences.cpp.o CMakeFiles/mudlet.dir/dlgRoomExits.cpp.o CMakeFiles/mudlet.dir/dlgScriptsMainArea.cpp.o CMakeFiles/mudlet.dir/dlgSourceEditorArea.cpp.o CMakeFiles/mudlet.dir/dlgSourceEditorFindArea.cpp.o CMakeFiles/mudlet.dir/dlgSystemMessageArea.cpp.o CMakeFiles/mudlet.dir/dlgTimersMainArea.cpp.o CMakeFiles/mudlet.dir/dlgTriggerEditor.cpp.o CMakeFiles/mudlet.dir/dlgTriggerPatternEdit.cpp.o CMakeFiles/mudlet.dir/dlgTriggersMainArea.cpp.o CMakeFiles/mudlet.dir/dlgVarsMainArea.cpp.o CMakeFiles/mudlet.dir/EAction.cpp.o CMakeFiles/mudlet.dir/exitstreewidget.cpp.o CMakeFiles/mudlet.dir/FontManager.cpp.o CMakeFiles/mudlet.dir/Host.cpp.o CMakeFiles/mudlet.dir/HostManager.cpp.o CMakeFiles/mudlet.dir/ircmessageformatter.cpp.o CMakeFiles/mudlet.dir/KeyUnit.cpp.o CMakeFiles/mudlet.dir/LuaInterface.cpp.o CMakeFiles/mudlet.dir/main.cpp.o CMakeFiles/mudlet.dir/mudlet.cpp.o CMakeFiles/mudlet.dir/ScriptUnit.cpp.o CMakeFiles/mudlet.dir/T2DMap.cpp.o CMakeFiles/mudlet.dir/TAction.cpp.o CMakeFiles/mudlet.dir/TAlias.cpp.o CMakeFiles/mudlet.dir/TArea.cpp.o CMakeFiles/mudlet.dir/TBuffer.cpp.o CMakeFiles/mudlet.dir/TCommandLine.cpp.o CMakeFiles/mudlet.dir/TConsole.cpp.o CMakeFiles/mudlet.dir/TDebug.cpp.o CMakeFiles/mudlet.dir/TDockWidget.cpp.o CMakeFiles/mudlet.dir/TEasyButtonBar.cpp.o CMakeFiles/mudlet.dir/TEncodingTable.cpp.o CMakeFiles/mudlet.dir/TEntityHandler.cpp.o CMakeFiles/mudlet.dir/TEntityResolver.cpp.o CMakeFiles/mudlet.dir/TFlipButton.cpp.o CMakeFiles/mudlet.dir/TForkedProcess.cpp.o CMakeFiles/mudlet.dir/TimerUnit.cpp.o CMakeFiles/mudlet.dir/TKey.cpp.o CMakeFiles/mudlet.dir/TLabel.cpp.o CMakeFiles/mudlet.dir/TLinkStore.cpp.o CMakeFiles/mudlet.dir/TLuaInterpreter.cpp.o CMakeFiles/mudlet.dir/TMap.cpp.o CMakeFiles/mudlet.dir/TMedia.cpp.o CMakeFiles/mudlet.dir/TMxpElementDefinitionHandler.cpp.o CMakeFiles/mudlet.dir/TMxpElementRegistry.cpp.o CMakeFiles/mudlet.dir/TMxpFormattingTagsHandler.cpp.o CMakeFiles/mudlet.dir/TMxpBRTagHandler.cpp.o CMakeFiles/mudlet.dir/TMxpColorTagHandler.cpp.o CMakeFiles/mudlet.dir/TMxpCustomElementTagHandler.cpp.o CMakeFiles/mudlet.dir/TMxpEntityTagHandler.cpp.o CMakeFiles/mudlet.dir/TMxpFontTagHandler.cpp.o CMakeFiles/mudlet.dir/TMxpLinkTagHandler.cpp.o CMakeFiles/mudlet.dir/TMxpNodeBuilder.cpp.o CMakeFiles/mudlet.dir/TMxpMudlet.cpp.o CMakeFiles/mudlet.dir/TMxpProcessor.cpp.o CMakeFiles/mudlet.dir/TMxpSendTagHandler.cpp.o CMakeFiles/mudlet.dir/TMxpSupportTagHandler.cpp.o CMakeFiles/mudlet.dir/MxpTag.cpp.o CMakeFiles/mudlet.dir/TMxpTagHandler.cpp.o CMakeFiles/mudlet.dir/TMxpTagParser.cpp.o CMakeFiles/mudlet.dir/TMxpTagProcessor.cpp.o CMakeFiles/mudlet.dir/TMxpVarTagHandler.cpp.o CMakeFiles/mudlet.dir/TMxpVersionTagHandler.cpp.o CMakeFiles/mudlet.dir/TriggerUnit.cpp.o CMakeFiles/mudlet.dir/TRoom.cpp.o CMakeFiles/mudlet.dir/TRoomDB.cpp.o CMakeFiles/mudlet.dir/TScript.cpp.o CMakeFiles/mudlet.dir/TSplitter.cpp.o CMakeFiles/mudlet.dir/TSplitterHandle.cpp.o CMakeFiles/mudlet.dir/TStringUtils.cpp.o CMakeFiles/mudlet.dir/TTabBar.cpp.o CMakeFiles/mudlet.dir/TTextCodec.cpp.o CMakeFiles/mudlet.dir/TTextEdit.cpp.o CMakeFiles/mudlet.dir/TTimer.cpp.o CMakeFiles/mudlet.dir/TToolBar.cpp.o CMakeFiles/mudlet.dir/TTreeWidget.cpp.o CMakeFiles/mudlet.dir/TTrigger.cpp.o CMakeFiles/mudlet.dir/TVar.cpp.o CMakeFiles/mudlet.dir/VarUnit.cpp.o CMakeFiles/mudlet.dir/XMLexport.cpp.o CMakeFiles/mudlet.dir/XMLimport.cpp.o CMakeFiles/mudlet.dir/glwidget.cpp.o CMakeFiles/mudlet.dir/mudlet_autogen/EWIEGA46WW/qrc_mudlet.cpp.o  -o mudlet  -Wl,-rpath,/usr/local/lib:/usr/local/lib/qt5:/home/stephen/src/mudlet/build-mudlet-Desktop_Qt_5_13_2_CMake_Clang_9_0_0-Debug/3rdparty/edbee-lib/edbee-lib/qslog/lib: ../3rdparty/communi/libcommuni.a ../3rdparty/edbee-lib/edbee-lib/libedbee-lib.a /usr/local/lib/libhunspell-1.7.so /usr/local/lib/liblua-5.1.so /usr/local/lib/libpcre.so /usr/local/lib/libpugixml.so /usr/local/lib/qt5/libQt5Concurrent.so.5.14.2 /usr/local/lib/qt5/libQt5Multimedia.so.5.14.2 /usr/local/lib/qt5/libQt5OpenGL.so.5.14.2 /usr/local/lib/qt5/libQt5UiTools.a /usr/local/lib/qt5/libQt5Widgets.so.5.14.2 /usr/local/lib/libyajl.so /usr/local/lib/libzip.so /usr/lib/libz.so /usr/local/lib/libqt5keychain.so.0.10.0 /usr/local/lib/qt5/libQt5TextToSpeech.so.5.14.2 /usr/local/lib/libGLU.so /usr/local/lib/qt5/libQt5Network.so.5.14.2 /usr/local/lib/qt5/libQt5Core.so.5.14.2 ../3rdparty/edbee-lib/edbee-lib/qslog/lib/libQsLog_d.so /usr/local/lib/qt5/libQt5Core.so.5.14.2 /usr/lib/libm.so /usr/lib/libdl.so /usr/local/lib/qt5/libQt5Network.so.5.14.2 /usr/local/lib/qt5/libQt5Gui.so.5.14.2 /usr/local/lib/qt5//libQt5Widgets.so /usr/local/lib/qt5//libQt5Gui.so /usr/local/lib/qt5//libQt5Core.so /usr/local/lib/qt5//libQt5Widgets.so /usr/local/lib/qt5//libQt5Gui.so /usr/local/lib/qt5//libQt5Core.so /usr/local/lib/libGL.so -lsecret-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl /usr/local/lib/qt5/libQt5DBus.so.5.14.2 /usr/local/lib/qt5/libQt5Core.so.5.14.2 /usr/local/lib/libGL.so -Wl,-rpath-link,/usr/local/lib 
ld: error: unable to find library -lsecret-1
ld: error: unable to find library -lgio-2.0
ld: error: unable to find library -lgobject-2.0
ld: error: unable to find library -lglib-2.0
ld: error: unable to find library -lintl
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [src/CMakeFiles/mudlet.dir/build.make:1833: src/mudlet] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:425: src/CMakeFiles/mudlet.dir/all] Error 2
gmake: *** [Makefile:164: all] Error 2
gmake[2]: Leaving directory '/home/stephen/src/mudlet/build-mudlet-Desktop_Qt_5_13_2_CMake_Clang_9_0_0-Debug'
gmake[1]: Leaving directory '/home/stephen/src/mudlet/build-mudlet-Desktop_Qt_5_13_2_CMake_Clang_9_0_0-Debug'
05:15:36: The process "/usr/local/bin/cmake" exited with code 2.
Error while building/deploying project mudlet (kit: Desktop Qt 5.14.2 Clang-9.0.0)
When executing step "CMake Build"

What might not be obvious is that the tail end does list those missing libs but only in the -l manner:
-lsecret-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl whereas other libraries are given as a full absolute pathname and not as an -l option.

Not sure either about the errors being reported by the ld executable given that the advanced CMake details show that the CMAKE_LINKER is, as is appropriate on FreeBSD, the llvm-link90 (i.e. the version 9.0 llvm-link as both llvm 8 and 9 are installed) one and not the GCC linker...!

SlySven added a commit to SlySven/Mudlet that referenced this pull request Aug 28, 2020
This was introduced by PR Mudlet#3889 which was using a function defined in the
LuaGlobal.lua file before it was loaded! The function definition has been
moved to be within the TLuaInterpreter class C++ code and, as it is now
present in two places, refactored out to a helper method so it can be
loaded into both the main and the lua code formatter Lua interpreters.

This should close Mudlet#4047.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
vadi2 pushed a commit that referenced this pull request Aug 28, 2020
)

This was introduced by PR #3889 which was using a function defined in the
LuaGlobal.lua file before it was loaded! The function definition has been
moved to be within the TLuaInterpreter class C++ code and, as it is now
present in two places, refactored out to a helper method so it can be
loaded into both the main and the lua code formatter Lua interpreters.

This should close #4047.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@SlySven SlySven deleted the windows_development branch August 29, 2020 23:00
SlySven added a commit to SlySven/Mudlet that referenced this pull request Sep 9, 2020
I introduced this error in Mudlet#3889 and it was reported in, and this PR
will close Mudlet#4066.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@SlySven SlySven mentioned this pull request Sep 9, 2020
SlySven added a commit that referenced this pull request Sep 10, 2020
I introduced this error in #3889 and it was reported in, and this PR
will close #4066.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
atari2600tim added a commit to atari2600tim/Mudlet that referenced this pull request Oct 1, 2020
* New Crowdin translations (#3859)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Russian)

* New translations mudlet-lua.json (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Pirate English)

* New translations mudlet-lua.json (Portuguese, Brazilian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Portuguese)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Greek)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet-lua.json (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Pirate English)

* New translations mudlet-lua.json (Portuguese, Brazilian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Portuguese)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Greek)

* New translations mudlet.ts (Pirate English)

* New translations mudlet-lua.json (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Pirate English)

* New translations mudlet-lua.json (Portuguese, Brazilian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Portuguese)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Greek)

* New translations mudlet.ts (Pirate English)

* Lua translations able to deal with empty strings (#3878)

* deal with empty strings

* Update src/mudlet-lua/lua/Other.lua

Co-authored-by: Kebap <leckerkebap@gmx.li>

Co-authored-by: Kebap <leckerkebap@gmx.li>
Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* BugFix: prevent crashes from recent Coverity Issue fixup

I was trying to be too clever and return a reference to an object.
I think I might have been able to extend the life-time of the item
concerned if I had made it a `const` but all in all it is simpler just to
use the normal return action that a compiler can use RVO to avoid making a
unneeded copy of the item.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Port QStringRef to QStringView (#3879)

* Fix for case insensitivity in exit line (#3875)

* Enhance: make multiView persistent (#3844)

* Enhance: make multiView persistent & compact input line act on all profiles

Makes the compact input line a toggle (so now it also has constant text).

Makes the multi-view stay active when `<Ctrl>+<Tab>` / `<Ctrl>+Number`
switching between - or clicking on the tab bars.

Also disables the (now a toggle) control for multi-view when there is less
than two profiles active.

This should close #1111 #1831 #3136 #3204 #2400, it may also improve #2099

It also disables dragging the tabs around so will prevent the issue
mentioned in #1456 pending a fix that can also rearrange the main
`TConsole`s to match.

Also improve layout of the Multi-view tool-tip for both the toolbar and
menu instances of the control.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revoke: remove changes disassociated with the multi-view issues

Required to simplify this PR and so they can be moved to a separate
PR.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Enhance: improve active tab indication in multi-view

Examining the situations in which clicking on a part of the UI does not
cause the indication of the active tab to reflect the profile that the
widget is part of has shown a few places which are addressed in this
commit:
* 2D Mapper
* 3D Mapper
* Search term entry widget in the commandl ine
* either `TTextEdit` in the Main or User Window `TConsole`
* `TLabels` in any `TConsole`

All of the above will now call a new mudlet::activateProfile(Host*) which
will ensure that the correct tab is selected, and that the member:
`(Host*) mudlet::mpCurrentActiveHost` is updated to also reflect that.

Also, if multi-view is active than there is not need to highlight the
tabs of profiles that have seen any changes - which is just as well as the
code to clear the tab is dependent on the user clicking on the affected
tab to show the tab and clear it - which is less likely to happen when in
the multi-view mode.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers (#3890)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers

As the Travis MacOs CI builds are using the latest libzip which is
currently the one which doesn't have LIBZIP_MAJOR and other version numbers
they were encountering a #error situation and aborting the build.

This is being fixed upstream so 1.70.1 should be okay.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Check for defines of LIBZIP_VERSION_MINOR

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* (autocommit) Updated text for translation (#3887)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated IRE mapping script to latest upstream (#3885)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update development with 4.9 release (#3897)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers (#3890)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers

As the Travis MacOs CI builds are using the latest libzip which is
currently the one which doesn't have LIBZIP_MAJOR and other version numbers
they were encountering a #error situation and aborting the build.

This is being fixed upstream so 1.70.1 should be okay.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Check for defines of LIBZIP_VERSION_MINOR

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
(cherry picked from commit bcbf8a0b4739e308d83ae592d98465358b642863)

* 4.9.0 release!

* Back to -dev

Co-authored-by: Stephen Lyons <slysven@virginmedia.com>

* Fix crash loading MMP map (#3899)

* Add spairs which iterates over any table in a sorted fashion (#3895)

* Adding spairs function for iterating over tables in a sorted fashion. Also adding tests for same

* Minor test change just to force appveyor to start over

* Add: getClipboardText and setClipboardText Lua functions (#3869)

* Added getClipboardText and setClipboardText functions to allow scripts to interact with the clipboard.

* A little bit of arranging so this code is matching the style of other Lua functions.

* Added references to the function's pages on the wiki.

* Revise: improve Variables icon (#3892)

This adds a white outline around the otherwise entirely black icons so that
they becomes visible when used with a dark desktop theme.

For the record this icon was created from scratch on a 256x256 transparent
background using The G.I.M.P. to draw "X=" in text in black using the
"Serif" or "Sans serif" font at a size of 150 (for two of the text based ones
the third had to be reduced to fit), that image was then redrawn in white four
times and each of them was offset by +/-4 in complimentary X and Y
directions (and the gaps at the ends filled in and blurred) so that they
expanded the background white around the black foreground.

The reason for expanding from the original 48x48 pixel size was to make the
anti-aliasing take up a much smaller proportion of the image - so it will
appear sharper even at higher resolutions.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* [ImgBot] Optimize images (#3910)

*Total -- 150.01kb -> 128.86kb (14.1%)

/src/icons/variables.png -- 15.69kb -> 7.79kb (50.32%)
/src/icons/table.png -- 1.60kb -> 0.85kb (46.89%)
/src/icons/function.png -- 39.66kb -> 31.92kb (19.53%)
/src/icons/variable.png -- 30.14kb -> 26.13kb (13.31%)
/src/icons/mudlet_ptb_256px.png -- 62.92kb -> 62.16kb (1.2%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

* Fixes #3900, bug on MXP SEND tags (#3908)

- Bug was caused by index out of range when processing MXP SEND tags with more commands than associated hints
- The solution uses HREF instead of HINT when the number of available hints is one and smaller than the number of commands

* Fix for Geyser HBox/VBox with width/height at 0 (#3909)

* prevent height/width of 0

* better solution still keeps hbox at 0

* small correction

* Fixes bug #3886 with links in miniconsoles (#3904)

- In TTextEdit code was looking for links and tooltips associated to the main console

* Update development with 4.9.1 release (#3911)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers (#3890)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers

As the Travis MacOs CI builds are using the latest libzip which is
currently the one which doesn't have LIBZIP_MAJOR and other version numbers
they were encountering a #error situation and aborting the build.

This is being fixed upstream so 1.70.1 should be okay.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Check for defines of LIBZIP_VERSION_MINOR

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
(cherry picked from commit bcbf8a0b4739e308d83ae592d98465358b642863)

* 4.9.0 release!

* Back to -dev

* Fix crash loading MMP map (#3899)

(cherry picked from commit 510c3be7b7cf421fd7143883bff65763d531de2b)

* Fixes #3900, bug on MXP SEND tags (#3908)

- Bug was caused by index out of range when processing MXP SEND tags with more commands than associated hints
- The solution uses HREF instead of HINT when the number of available hints is one and smaller than the number of commands

(cherry picked from commit 46320c31355e5a797f57e04d23774caf269cb7cd)

* Fix for Geyser HBox/VBox with width/height at 0 (#3909)

* prevent height/width of 0

* better solution still keeps hbox at 0

* small correction

(cherry picked from commit a7dc3a22d2928f9b6020ec482bedfa65a8f4c85f)

* Fixes bug #3886 with links in miniconsoles (#3904)

- In TTextEdit code was looking for links and tooltips associated to the main console

(cherry picked from commit 547c65846c8b4c1b6fc4e45b127cdebda93ea00b)

* 4.9.1 bugfix release

* Back to -dev

Co-authored-by: Stephen Lyons <slysven@virginmedia.com>
Co-authored-by: Gustavo Sousa <gustavocms@gmail.com>
Co-authored-by: Manuel Wegmann <60551052+Edru2@users.noreply.github.com>

* (autocommit) Updated autocompletion data (#3919)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Enhance: make compact input line feature act on individual profiles and be saved for each profile (#3866)

This message is an edited compilation of the individual commits that
made up the eventual squashed and merged PR:

Makes the compact input line a toggle (so now it also has constant text).
The previous code only considered the currently active profile which
was contradicted by the fact that the state - which was maintained
between sessions - was stored centrally as an application setting rather
than a per profile one.

This was split out of a larger PR that originally included it:
https://github.com/Mudlet/Mudlet/pull/3844 .

Because of the poor tracking of `(Host*) mudlet::mCurrentActiveHost`
the use of the short-cut or menu item to toggle the state of the input line
did not fully track which profile is active yet. That was improved when
PR 3844  went in.

BugFix: clicking on a different profile needs to update compact input line

Although clicking on the tab bar changed the currently active host and that
would update the compact input line menu item state to match the newly made
active profile the same thing was not happening if the profile was made
active by being clicked on in other places when in multi-view. This was
only discovered after PR 3844 was applied.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* New Crowdin translations (#3894)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (German)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* Show an echo when uploading (#3858)

* Fix crash importing custom lines with Qt 5.14+ (#3923)

* Client.Media: Remove Camel Case Package Requirement (#3925)

* Remove Camel Case Requirement from Client.Media

* Remove Camel Case Requirement from Client.Media

* Don't call Lua functions with too many arguments (#3924)

* Don't call Lua functions with too many arguments

* Show a warning when trimming

* Fix bug in parsing MXP tag with = symbol in attribute value (#3933)

* (autocommit) Updated text for translation (#3936)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* More concise tooltip for compact input line (#3937)

* Revise: prevent multiple connection dialogues

This will close Issue: #2706.

Also fix a couple of warnings for the `dlgConnectionProfiles` class:
* an out of order initialisation list
* an unused argument in:
 `(void) dlgConnectionProfiles::slot_update_name(const QString&)`

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Remove Default Host code from IRC (#3927)

* Ensure `dlgIRC::mIsDefaultIrcClient` is set when IRC init from Lua.
This addresses some code that should be removed all together, since we no longer use IRC as a main help-chat in favor of Discord.

* Remove cruft code entirely.

* Forget about mudlet.cpp changes and break the build ;)

* enable/disable IRC client options with host.

* Add the keepColor option to replaceAll and replaceWildcard (#3943)

* Add the keepColor options to replaceAll finally
* Add it to replaceWildcard too

* Donot resize item in HBox/VBox if not dynamic (#3947)

* BugFix: HBoxes and VBoxes should not change height or width if the policy for that constraint is not dynamic
* Only call resize if the value has changed
* Don't forget the % in the comparison
* fixed/dynamic mixed suggestion
* Update GeyserVBox.lua
* Reset contains_fixed at start of organize loop so it changes if all fixed items have been removed
* And for VBox
* Add comment
Co-authored-by: Edru2 <alyven_87@hotmail.com>

* Skip downloading GET response if there's no file path (#3932)

* Enhance: prevent password sniffing from sysDataSendEvent (#3928)

This revises cTelnet::sendData(...) so that it does NOT create a
`sysDataSendRequest` with the password when called from:
`cTelnet::slot_send_pass()` .

Also, in passing also found that similar mudlet class slot methods:
`mudlet::::slot_send_login()` and `mudlet::::slot_send_pass()` are not used
so can be pruned and then three `QQueue<QString>` in that same class are
not used either.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* BugFix: make date display of profile's history follow selected UI locale (#3917)

* BugFix: make date display of profile's history follow selected UI locale

This PR adds a `QLocale` object to the `mudlet` class that is set to the
user's selection of UI locale (language + country) so that items that need
to return data in a locale aware form can use:
`(const QLocale&) mudlet::getUserLocale()`
in order to present their information in their selected form rather than
using what they or their OS/DE has set system/desktop-wide.

In this PR it is used to format and present in the correct language the
date and time entries for the profile's history but it can be used
elsewhere within the Mudlet application as needed.

Also:
* reorder some items in `dlgConnectionProfile`'s class to be correct.
* mark an unused argument in `dlgConnectionProfile::slot_update_name(...)`
as unused to prevent a warning.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: exclude the display of a time zone in the profile's history

It takes up extra space which is tight in that widget and (apart from the
time around a DST change) does not impart much information to the display.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Apply suggestions from code review

Removed unwanted ellipses from debug texts...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Refactor: remove minute visible name from Connection dialogue icons

We have been trying to hide the text associated with the `QListWidgetItems`
in the connection dialogue by setting the font size to the minimum of `1`
and by setting it's colour to be white. This is not effective when the
background is not white - which is likely for a "Dark" desktop environment.
The only way to successfully hide the text is, I think, to not have any!

However the text was being used programmatically, so the best way to use
a `QListWidget` in this mannar is to store the text elsewhere in each
item's structure. Fortunately Qt provides for this with the user data
functionality which allows multiple data items (based on the `QVariant`
class) to be stored within each `QListWidgetItem` using an integer key to
denote the type of the data. Ironically the text, icon and other details
for each item are ALSO stored in this way - however for non-Qt internal
use the lowest integer key that is to be used is `Qt::UserRole` - which
I have assigned to the `(const int) dlgConnectionProfiles::csmNameRole`
static value. It is quite possible that a redesign of the Connect Profiles
dialogue may use this system to store/cache more details about each profile
in the future!

The only issue with this is the lack of a:
`QListWidget::findData(const QVarient&data, int role = Qt::UserRole ...)`
method (c.f. `QComboBox::findData(...)`) so I have had to provide a:
`(QList<QListWidgetItem*>) findData(const QListWidget&, const QVariant&,
                                      const int role = Qt::UserRole) const;
method to fill in this gap and to replace the previous
`QListWidget::find(...)` that examined each item's text.

Also removed local `(QString) profile` from:
`(void) dlgConnectionProfiles::slot_item_clicked(QListWidgetItem*)` as it
is merely a redundent duplicate of another local `(QString) profile_name`.

Renamed local `(QListWidgetItem*) pM` from:
`(void) dlgConnectionProfiles::fillout_form()` to:
`(QListWidgetItem*) pItem` as that reflects the name used throughout the
rest of the class for this type of variable.

Changed a `(QLabel*)::setText(tr(""))` call to the more explicit and less
stupid `(QLabel*)::clear()`. Similarly changed a
`(QWidget*)::setToolTip("")` to a `(QWidget*)::setToolTip(QString())`.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* New Crowdin updates (#3921)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* (autocommit) Updated text for translation (#3949)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update src/dlgConnectionProfiles.cpp

Remove unneeded command as per peer-review suggestion.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: src/dlgConnectionProfiles.h

CodeFactor says that the `static` keyword should come first (before the `const` one).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* (autocommit) Updated autocompletion data (#3954)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated edbee-lib submodule to latest in our fork (#3953)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update: add a couple of new dictionaries to the set that Mudlet recognises

This is so that a text is displayed instead of a fall-back of the locale
code.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* BugFix: announce end of replays when run from replay button

I got the logic reversed in the original #1519 for
`(bool) cTelnet::mmIsReplayRunFromLua` so the ending message was not being
displayed when it should have been.

This will close #2793.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Add dummy functions for TTS if Mudlet was compiled with TTS disabled (#3958)

* Update Linux builds to Qt 5.12.9 (#3959)

* Update Linux builds to Qt 5.12.9

* Update .travis.yml

* Bugfix for string.split with too many characters (#3963)

* Allow string.split("my string", "") with strings > 32 characters
Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* (autocommit) Updated text for translation (#3968)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update discordapp.com to discord.com (#3979)

* Capitalise 'errors' button text (#3987)

* Avoid new ptb if no new commit (#3990)

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* Update build-mudlet.yml (#3991)

* Add cfeedTriggers, dfeedTriggers, and hfeedTriggers (#3974)

* Add cfeedTriggers, dfeedTriggers, and hfeedTriggers
* add apt update back to linux github build runner
* Giving in because too tired to argue

* Server Data Encoding Selection via Telnet CHARSET (#3972)

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* (autocommit) Updated text for translation (#3995)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated autocompletion data (#3996)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Missing files in src/.gitignore (#3997)

* NAWS width handling & reporting (#4002)

* Add Geyser.MiniConsole:display() (#3993)

* Fix typo preventing use of getFg/BgColor on non-main consoles. (#3982)

* (autocommit) Updated autocompletion data (#4006)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Zoom via mouse wheel: keep the position under the cursor in place (#3998)

* Zoom centered on the mouse position

Zooming via the scroll wheel now keeps the position under the curser in
place.

* QT <5.14 compatibility

* Use an exponential factor when zooming

This makes the zoom experience a lot smoother: the step size no longer
depends on how close you're zoomed in.

* Add a separate getHTTP operation and associated events (#4003)

* Add a separate GET operation

Sometimes you just need to read some data from the HTTP server without
going through writing the response to a file.

Also, when a POST redirects to a GET, the reply was lost.

Thus this change introduces a dedicated "getHTTP" function, and a
"sysGetHttpDone" event that contains the actual data.

* Two error messages had the wrong function name

* Bugfix: GET error should receive the URL

Also adds the URL to the download error, as an additional argument

* Grammar and style fix

per comment from SlySven

* bugfix: generic_mapper map config errors (#3971)

* bugfix: Correct help variable for map config

This makes calling `map config` without a specifier work as intended in the trigger.

* Restore map.help.configs to singular

Revert 7b8d532

* bugfix: Point map config alias to correct help

making the #3970 fix in the script broke `map help config`. because the `show_help` function parses the user supplied argument, the script's so-called "help file" needs to have the same singular title as the requested argument. thus, this commit points `map config` to `map.help.config` when the alias is called without argument and also retains the intended `map help config` feature.

* ci: enable sudo apt update

* ci: Re-disable apt update

* Special macOS icons (#3829)

* New macOS .icns icon files

* wire in new macOS icons

Co-authored-by: Kebap <kebap_spam@gmx.net>

* Return table of useful things in HTTP response (#3727)

* Return table of headers in HTTP responses

* Apply code review suggestions

* Make sure to free data stored in lua registry by events

* Try including optional here

* Include optional in both h and cpp files

* Work around OS X limitation https://stackoverflow.com/a/44244070/2197402

* Remove what I now think to be a superfluous include

* Make headerList a const a different way

* Follow the Mudlet convention for how to convert this to const char *

* Put the headers table in a table

* Put the cookies table in a table

* Include QNetworkCookieJar so compiler knows more about the type

* Include QNetworkCookie so compiler knows more about the type

* New Crowdin updates (#3950)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (German)

* (autocommit) Updated autocompletion data (#4011)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Update widechar_width.h to latest upstream (#4010)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Revise: reorder tabs and tab stops in profile preferences (#3929)

Switch some uses of QGridLayout <==> QVBoxLayout depending on whether there
is more or only one column of items.

Moved the "Special options" tab to the last position.

Switch some single columns of items to become two columns so that the
overall vertical size needed for the dialogue can be reduced.

Moved the Discord and IRC options to a new tab "Chat".

These last two are important as they allow the overall dialogue to be
smaller and thus may enable us to close: #3467, #3304.

Removed unused groupBox that has something about deleting map backups. It
is not handled or mentioned in the current code at all and just sits there
as a disabled widget in the mapper tab.

Revise: try to make the preferences dialogue narrower

Set the initial size to be the smallest I can get in use on my Linux
Desktop - others' mileage may vary!

Revise: tweak some texts in accordance with peer-review suggestions

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Support for parsing MXP closing prefixed closing tags used in Materia Magica (#4016)

- Workaround for parsing tags in the format `<scripted_action>x<x/scripted_action>`

* Fixes issue on miniconsoles using link store from the main console (#4017)

* Refactor to create and expose decho2ansi and hecho2ansi functionality (#4019)

* Revise: try and identify profiles and some controls in connection dialog (#3966)

Also convert all `setDisabled(state)` to `setEnabled(!state)` in the
`dlgConnectionProfiles` class - using a single one instead of a mix of the
two is less likely to lead to errors - and it means less effort to search
for the places where something is being enabled or disabled.

Shorten some overlong variable names.

Remove some capitalisations.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* BugFix: restore L. yellow colour button + insert new control in tab order

Due to a numbering error the button used to set the ANSI colour for Light
Yellow for the profile's console was positioned to be on top of the Light
Green one. This was introduced by my #3929 a few days ago!

Also insert a recently added checkbox (force Telnet CHARSET negotiation
off) did not have a tab order specified so navigating around the
preferences dialog with the tab key would not visit it in the right
sequence.

For consistency the order of the main console font size and anti-aliasing
checkbox needed to be swapped over.

To allow both PRs #3952 and #3832 to merge in where they both add in a new
(different) control into the `gridLayout_groupBox_debug` layout in the
"Special options" tab of the profile preferences dialogue a gap has
been left in row 3 of that layout which will be used by the latter of those
two PRs (the other one will add a new row to the end).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* (autocommit) Updated autocompletion data (#4025)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated text for translation (#4024)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Revise: minor change post PR #3966

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Making the foreground section of the hex pattern a noncapturing group allows for only setting the background via hecho/etc. (#4027)

* MXP to MSP Tags (#4015)

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* test/CMakeLists.txt update

* test/CMakeLists.txt update backout

* test/CMakeLists.txt update

* Fix bresetProfile() #3692 (#4020)

* fixes resetProfile()

units need to be enabled to be compiled
the order was wrong

* timers were not re-compiled

* TimerUnit compileAll will now really compile all timers

TimerUnit compileAll didn't compile all timers but only the ones in the rootnode what means that timers in a folder weren't compiled at all

* fix eventhandler not loading after resetProfile()

* (autocommit) Updated text for translation (#4033)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Found a typo where rb and gb were not made local (#4036)

* Allow text color manipulation by StyleSheet on Geyser.Labels (#4042)

* Allow text color manipulation by StyleSheet on Geyser Labels

* cosmetic suggestion and rawEcho

* Introduce purgeMediaCache() [MCMP & MSP] (#4041)

* Introduce purgeAllMediaFiles()

* Introduce purgeMediaCache()

* Updating lua-function-list

* Removed TMedia:: prefix (SlySven)

* Enhance: enable builds in a full Windows MSYS2 environment (#3889)

* Enhance: enable builds in a full Windows MSYS2 environment (QMake only)

By defining `WITH_MAIN_BUILD_SYSTEM` to the value `NO` this PR makes enough
changes to the qmake project file to enable Mudlet to be compiled in a full
MSYS2 development environment (in the MSYS2 Qt Creator) - this will enable
easier development by Windows users (particularly those who also have some
familiarity with *nix systems) as I have documented at:
"Compiling on Windows 7+ (MSYS2_Alternative)" but it seems that the URL is
causing GitHub to forget about the PR as it seems to push and is recorded
in my local repository but never actually lands there!

It also makes some changes to the setting up of the LUA package paths for
the lua code formatter so that the paths are all entered with Unix style
directory separators but converted to whatever the Lua package handler is
set to use. In a Windows environment it is not unheard of to get both '\'
and '/' being used within the same path as different parts get generated
in stages - and using the backslash one can produce surprising error
messages if the back slash is not properly escaped when displaying those
messages in the main console or elsewhere (they dissappear entirely or
end up escaping following characters producing misleading information).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Update src/mudlet.pro

BugFix: fix a typo in qmake project file.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: reduce almost duplicate comments

Fix an addition to the `package.cpath` which would not have worked as it
did not specify the file extension which is OS dependent.

Also remove LuaJIT remenent, which we dropped support for a long time back.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Apply suggestions from code review

Revise: fix an error in a comment.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: take out some pre-processor stuff as run-time code works without it

I was a bit sceptical at first but it *seems* to work.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Enhance: modifications to get CMake working on Windows

Revise a Mudlet specific CMake macro to not include the word "module" as
that is not appropriate for all usages now.

Fix an obscure CMake build error caused by the use of:
`LIBRARYNAME::LIBRARYNAME` in `target_link_libraries(...)` which is the
form for an interface usage of a library - this causes a failure of the
build with an error message of the form:
`src/CMakeFiles/mudlet.dir/build.make:1954: *** target pattern contains
no '%'.  Stop.` that line is actually one about one of the libraries
concerned - and it is the first one which shows up in that file with a
LIBRARYNAME-NOTFOUND entry. The fix seems to be to use only a LIBRARYNAME
form.

Fix a problem in `(static QString) mudlet::getShortPathName(const QString&
name)` which is cause by a Windows specific function that takes.returns
template/typedef type arguments which only work if the symbols
`UNICODE` and `_UNICODE` to be defined and which aren't in an MSYS2/
Mingw-w64 environment.

Revise some usages of the APP_BUILD defined value so that they are
handled correctly (using `QStringLiteral`/`QByteArray` wrapppers).

Change the CMake find module for Pugixml so that it uses a variable name in
ALL_UPPER_CASE to remove a developer warning about using a mixed case one.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Edit: fix copy paste issue

I thought something needed to be more conditional than it was but didn't
get it undone in last commit.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Refactor: simplify the code to set up the Lua/C additional paths for LCF

Peer-review suggested I needed to shrink the code.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: shrink some comments

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: implement some changes requested by peer-review

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: shorten multi-line comment in initIndenterGlobals()

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: further change suggested in peer-review

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Fix recognition of static libraries in own Find modules

Co-authored-by: keneanung <keneanung@googlemail.com>

* BugFix: repair failure to load Lua modules from profile directory (#4051)

This was introduced by PR #3889 which was using a function defined in the
LuaGlobal.lua file before it was loaded! The function definition has been
moved to be within the TLuaInterpreter class C++ code and, as it is now
present in two places, refactored out to a helper method so it can be
loaded into both the main and the lua code formatter Lua interpreters.

This should close #4047.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* (autocommit) Updated text for translation (#4049)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Fixed offset and scrollbars nestedLabels (#4043)

offset was calculated wrong for some combinations and the scrollbars didn't work and had a variable leaking to global

* (autocommit) Updated autocompletion data (#4059)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Math in Geyser constraints (#4056)

* get rid of loadstring and more resizing possibilities

* Update GeyserGeyser.lua

* now really working

* function values update on window resize

There was an issue that function values didn't update on window resize but only when the elemen was resized moved.
This is fixed now.

* Fix Geyser HBox/VBox in development (#4057)

* BugFix: TTYPE error

I introduced this error in #3889 and it was reported in, and this PR
will close #4066.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Ignore Qt Creator autosave files (#4068)

* Add custom Input/Command lines (#4055)

* createCommandLine + Geyser.CommandLine

* subcommandline event / Geyser.CommandLine:setAction

* setWindow crash

setWindow was crashing due to wrong assignment

* add ConsoleCmdLine to MiniConsoles

trying to please codefactor.
Geyser doc had a copy/paste fail.
added a workaround for cursor not visible in some situations like if writing to much text in the commandline

Added ConsoleCmdLine to miniconsoles + geyser

* get rid of the event and introduce set/resetCmdLineAction

* code factor

* fix commandline dissapearing on resize

* fix issue with focus and resize of MiniConsoles when using custom command lines (#4073)

* fix focus and resize of MiniConsole command lines

* get it to work also for UserWindows

* Update generic_mapper.xml (#4075)

* Update the port on StickMUD to use TLS (#4072)

* Geyser.Label rightClick menu (#4054)

* Geyser.Label rightClick menu

gives labels the possibility to have a right click menu

* added rightclickmenu to adjustable.container

* darkmode for adjustable.container

* writing docs and got rid of configmenuLabel

* set StyleSheet for UserWindows (border and title area) (#4046)

* setUserWindowStyle (primitive and Geyser)

* fix autoDock

* Revert "fix autoDock"

This reverts commit c0b1b7a3159818fb307e6a09b3e2b928a650dfb1.

* fix autodock (#4048)

* Allow Geyser containers to have height/width 0 (#4078)

* calculated_width 1 if 0

* same for vbox

* calculated size dynamic

* make code cleaner

* allow adjustable container to load in userwindow (#4037)

* Allow attached Adjustable.Containers to behave like a frame  (#4032)

* MainWindow border margin for attached Adjustable.Containers

* add attachedMargin to the docs

* connectToBorder() disconnect() addConnectMenu()

Allows you to connect your attached adjustable.container to a border which means that it behaves like the border is a frame.
Makes very similar GUI to GUIFrame possible.

* better ConnectMenu + localization

use of new right click menu to make the connectMenu better looking and userfriendlier

* Remove mapper click workaround (#4076)

* Allow different save/load directories and slots for Adjustable.Container settings  (#4053)

* add slot and dir to save/load settings of Adjustable.Containers

* save slot in one file + deleteSaveFile + defaultDirectory

* conflict solved changeContainer also working with slots

* check if attached before trying to detach

* BugFix: prevent Segmentation Faults when closing profile with toolbars

I was getting this error when closing one profile with a tool-bar when
multi-playing. Not sure of the exact cause (other than the toolbar did NOT
have a particular {meta}property - but was trying to convert the
non-existent `QVariant` that would represent it to a Boolean value) but
this should prevent a fatal application crash should it occur again...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Fix PTB build generation (#4081)

* Move commit date logic to earler

* Use commit date instead of author date

* Add background image to mini/main console (#4064)

* first success

* add background image to miniconsole transparency for cecho,decho,hecho

Added ability to add background image to miniconsole.
cecho, hecho, decho support transparency now

* add image also to main console

+ use mpBackground for backgroundcolors
to increase performance

* Update TLuaInterpreter.cpp

* give splitter palette to solve issue with darktheme

darktheme was able to change the background if the splitter had no color set.
this is fixed now

* still darktheme issue

* elements were hidden behind the background (fixed)

* resetBgImage BgImageModes and code suggestions

* change order for :lower as it caused strange issues

* Geyser MiniConsole set/resetBackgroundImage update

* (autocommit) Updated autocompletion data (#4034)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Fix links clickable on the whole console width (#4083)

* prevent links to use full console width

prevent links to use full console width by checking if the mouse is out off the right bound

* make isOutOffBound non-optional

* change isOutOffBound to isOutOffbounds

* typo

* Add horizontal scrollbar to error-console (#4063)

* add scrollbar to errorconsole

* add horizontal scrollbar to error console

* hide if not needed

* update horizontal scrollbar on redrawing

* selection works even if scrolled to the right

* added suggestions and selecting is visible now

* add suggested code changes

* Update TTextEdit.cpp

* these are obsolte due to the background-image pr

these are not needed anymore and could cause a performance issue

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* (autocommit) Updated autocompletion data (#4084)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Setup Mudlet for C++ Github Codespaces (#4087)

* Valgrind complained about an uninitialized field. (#4090)

* Improve generic mapper triggers (#4086)

* New Crowdin updates (#4009)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet-lua.json (French)

* New translations mudlet-lua.json (Russian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Italian)

* New translations mudlet-lua.json (German)

* New translations mudlet-lua.json (Italian)

* New translations mudlet-lua.json (German)

* New translations mudlet.ts (German)

* New translations mudlet-lua.json (English, United Kingdom)

* New translations mudlet-lua.json (Russian)

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* Open Mudlet remotely using Github Codespaces (#4088)

* Improve codespaces setup

* Added libqt5opengl5-dev

* Forward vnc port 5900 by default

* Install Lua dependencies

* Add script to run Debian UI

* Fix schellcheck warning

* Update Dockerfile with desktop Debian instructions

* Updated devcontainer.json with desktop Debian

* Fix Dockerfile linter

* Fix spelling in the Dockerfile (#4094)

* ansi2string to strip ANSI colours (#4092)

* Install CMake tools as well for Github Codespace (#4096)

* Update Codespaces remote connect password (#4097)

* BugFix: handle floating toolbars with no DockArea set

I discovered I had a problem with this when working on something else with
an existing profile. The result was that the toolbar concerned was not
added to the main window. This PR forces a resolution to this by reapplying
the toolbar to the default left DockWidgetArea if no previous one seemed to
be set.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Bugfix: handling of Big5 encodings for ambiguous E Asian auto-widening (#4030)

When the preference that controlled the E. Asian widening was set to "Auto"
it was not being correctly detected as the wrong `QByteArray` strings were
being checked against the currently selected Game Server encoding setting.
This would mean that both the variants that Mudlet offered would be using
the "Normal"/"Narrow" wide for such ambiguous graphemes rather than the
"Wide" that was intended.

Also, there were some places in the `TLuaInterpreter` class where the
encoding details were being treated as `QString`s rather than the
`QByteArray` that is used specifically to match up with Qt's own usage,
and avoid the whole `QStringLiteral(...)`/`QObject::tr(...)` wrapper issue
that arises from the use of `QString`...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* fix ctrl crash (#4098)

* Add a global event listener: `*` and Lua interpreter cleanup (#4091)

* pGlobalLua cannot be NULL

* Don't clear the stack

Internal functions should leave the stack as they found it.
Clearing it is not intuitive and in fact causes crashes.

* Clean up MSSP event generation

That loop is obfuscating the code.

* Add a "*" wildcard event subscription.

* Teach the Lua event dispatcher about "*"

This requires registering the Lua dispatcher to "*" instead of every
single event type. Otherwise as soon as somebody wants all events
every dispatcher would be called twice.

* Use a constant string

* Use upper pane height for page scroll (#4099)

* use upperPane for page scrolling

* screenheight was private

* removeAction was missing when parent was deleted (#4101)

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* Fix right-click menu and image copy (#4102)

* restore old behaviour

restore old behaviour for right click menu and for the
image copy

* add bg color to image copy

bg color was always black in image copy.
Now it's completly the old behaviour

* Fix release version numbers in windows installers

* Fix typo in mapper's area box warning (#4106)

* Fix macOS packaging (#4103)

* Try brew update-reset instead of update

* Use brew-update-reset branch

* Back to brew update

* Revert "Back to brew update"

This reverts commit 84e00b69675bf1f635c50de1776a6a710c51e156.

* Update travis.osx.after_success.sh

* Update travis.osx.before_install.sh

* Update travis.osx.before_install.sh

* One last time, try brew update-reset

* Fix typo (#4110)

* ok

Co-authored-by: mudlet-machine-account <39947211+mudlet-machine-account@users.noreply.github.com>
Co-authored-by: Manuel Wegmann <60551052+Edru2@users.noreply.github.com>
Co-authored-by: Kebap <leckerkebap@gmx.li>
Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
Co-authored-by: Stephen Lyons <slysven@virginmedia.com>
Co-authored-by: Gustavo Sousa <gustavocms@gmail.com>
Co-authored-by: Eraene <wisps.of.time@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>
Co-authored-by: Damian Monogue <3660+demonnic@users.noreply.github.com>
Co-authored-by: Ian Adkins <ieadkins@gmail.com>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Mike Conley <sousesider@gmail.com>
Co-authored-by: Fae <itsthefae@gmail.com>
Co-authored-by: Jonathan Mohrbacher <johnnymo87@gmail.com>
Co-authored-by: keneanung <keneanung@googlemail.com>
Co-authored-by: Matthias Urlichs <matthias@urlichs.de>
Co-authored-by: Stack <stack@ilpdev.com>
Co-authored-by: Kebap <kebap_spam@gmx.net>
atari2600tim added a commit to atari2600tim/Mudlet that referenced this pull request Oct 1, 2020
* New Crowdin translations (#3859)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Russian)

* New translations mudlet-lua.json (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Pirate English)

* New translations mudlet-lua.json (Portuguese, Brazilian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Portuguese)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Greek)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet-lua.json (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Pirate English)

* New translations mudlet-lua.json (Portuguese, Brazilian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Portuguese)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Greek)

* New translations mudlet.ts (Pirate English)

* New translations mudlet-lua.json (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Pirate English)

* New translations mudlet-lua.json (Portuguese, Brazilian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Portuguese)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Greek)

* New translations mudlet.ts (Pirate English)

* Lua translations able to deal with empty strings (#3878)

* deal with empty strings

* Update src/mudlet-lua/lua/Other.lua

Co-authored-by: Kebap <leckerkebap@gmx.li>

Co-authored-by: Kebap <leckerkebap@gmx.li>
Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* BugFix: prevent crashes from recent Coverity Issue fixup

I was trying to be too clever and return a reference to an object.
I think I might have been able to extend the life-time of the item
concerned if I had made it a `const` but all in all it is simpler just to
use the normal return action that a compiler can use RVO to avoid making a
unneeded copy of the item.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Port QStringRef to QStringView (#3879)

* Fix for case insensitivity in exit line (#3875)

* Enhance: make multiView persistent (#3844)

* Enhance: make multiView persistent & compact input line act on all profiles

Makes the compact input line a toggle (so now it also has constant text).

Makes the multi-view stay active when `<Ctrl>+<Tab>` / `<Ctrl>+Number`
switching between - or clicking on the tab bars.

Also disables the (now a toggle) control for multi-view when there is less
than two profiles active.

This should close #1111 #1831 #3136 #3204 #2400, it may also improve #2099

It also disables dragging the tabs around so will prevent the issue
mentioned in #1456 pending a fix that can also rearrange the main
`TConsole`s to match.

Also improve layout of the Multi-view tool-tip for both the toolbar and
menu instances of the control.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revoke: remove changes disassociated with the multi-view issues

Required to simplify this PR and so they can be moved to a separate
PR.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Enhance: improve active tab indication in multi-view

Examining the situations in which clicking on a part of the UI does not
cause the indication of the active tab to reflect the profile that the
widget is part of has shown a few places which are addressed in this
commit:
* 2D Mapper
* 3D Mapper
* Search term entry widget in the commandl ine
* either `TTextEdit` in the Main or User Window `TConsole`
* `TLabels` in any `TConsole`

All of the above will now call a new mudlet::activateProfile(Host*) which
will ensure that the correct tab is selected, and that the member:
`(Host*) mudlet::mpCurrentActiveHost` is updated to also reflect that.

Also, if multi-view is active than there is not need to highlight the
tabs of profiles that have seen any changes - which is just as well as the
code to clear the tab is dependent on the user clicking on the affected
tab to show the tab and clear it - which is less likely to happen when in
the multi-view mode.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers (#3890)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers

As the Travis MacOs CI builds are using the latest libzip which is
currently the one which doesn't have LIBZIP_MAJOR and other version numbers
they were encountering a #error situation and aborting the build.

This is being fixed upstream so 1.70.1 should be okay.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Check for defines of LIBZIP_VERSION_MINOR

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* (autocommit) Updated text for translation (#3887)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated IRE mapping script to latest upstream (#3885)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update development with 4.9 release (#3897)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers (#3890)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers

As the Travis MacOs CI builds are using the latest libzip which is
currently the one which doesn't have LIBZIP_MAJOR and other version numbers
they were encountering a #error situation and aborting the build.

This is being fixed upstream so 1.70.1 should be okay.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Check for defines of LIBZIP_VERSION_MINOR

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
(cherry picked from commit bcbf8a0b4739e308d83ae592d98465358b642863)

* 4.9.0 release!

* Back to -dev

Co-authored-by: Stephen Lyons <slysven@virginmedia.com>

* Fix crash loading MMP map (#3899)

* Add spairs which iterates over any table in a sorted fashion (#3895)

* Adding spairs function for iterating over tables in a sorted fashion. Also adding tests for same

* Minor test change just to force appveyor to start over

* Add: getClipboardText and setClipboardText Lua functions (#3869)

* Added getClipboardText and setClipboardText functions to allow scripts to interact with the clipboard.

* A little bit of arranging so this code is matching the style of other Lua functions.

* Added references to the function's pages on the wiki.

* Revise: improve Variables icon (#3892)

This adds a white outline around the otherwise entirely black icons so that
they becomes visible when used with a dark desktop theme.

For the record this icon was created from scratch on a 256x256 transparent
background using The G.I.M.P. to draw "X=" in text in black using the
"Serif" or "Sans serif" font at a size of 150 (for two of the text based ones
the third had to be reduced to fit), that image was then redrawn in white four
times and each of them was offset by +/-4 in complimentary X and Y
directions (and the gaps at the ends filled in and blurred) so that they
expanded the background white around the black foreground.

The reason for expanding from the original 48x48 pixel size was to make the
anti-aliasing take up a much smaller proportion of the image - so it will
appear sharper even at higher resolutions.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* [ImgBot] Optimize images (#3910)

*Total -- 150.01kb -> 128.86kb (14.1%)

/src/icons/variables.png -- 15.69kb -> 7.79kb (50.32%)
/src/icons/table.png -- 1.60kb -> 0.85kb (46.89%)
/src/icons/function.png -- 39.66kb -> 31.92kb (19.53%)
/src/icons/variable.png -- 30.14kb -> 26.13kb (13.31%)
/src/icons/mudlet_ptb_256px.png -- 62.92kb -> 62.16kb (1.2%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

* Fixes #3900, bug on MXP SEND tags (#3908)

- Bug was caused by index out of range when processing MXP SEND tags with more commands than associated hints
- The solution uses HREF instead of HINT when the number of available hints is one and smaller than the number of commands

* Fix for Geyser HBox/VBox with width/height at 0 (#3909)

* prevent height/width of 0

* better solution still keeps hbox at 0

* small correction

* Fixes bug #3886 with links in miniconsoles (#3904)

- In TTextEdit code was looking for links and tooltips associated to the main console

* Update development with 4.9.1 release (#3911)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers (#3890)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers

As the Travis MacOs CI builds are using the latest libzip which is
currently the one which doesn't have LIBZIP_MAJOR and other version numbers
they were encountering a #error situation and aborting the build.

This is being fixed upstream so 1.70.1 should be okay.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Check for defines of LIBZIP_VERSION_MINOR

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
(cherry picked from commit bcbf8a0b4739e308d83ae592d98465358b642863)

* 4.9.0 release!

* Back to -dev

* Fix crash loading MMP map (#3899)

(cherry picked from commit 510c3be7b7cf421fd7143883bff65763d531de2b)

* Fixes #3900, bug on MXP SEND tags (#3908)

- Bug was caused by index out of range when processing MXP SEND tags with more commands than associated hints
- The solution uses HREF instead of HINT when the number of available hints is one and smaller than the number of commands

(cherry picked from commit 46320c31355e5a797f57e04d23774caf269cb7cd)

* Fix for Geyser HBox/VBox with width/height at 0 (#3909)

* prevent height/width of 0

* better solution still keeps hbox at 0

* small correction

(cherry picked from commit a7dc3a22d2928f9b6020ec482bedfa65a8f4c85f)

* Fixes bug #3886 with links in miniconsoles (#3904)

- In TTextEdit code was looking for links and tooltips associated to the main console

(cherry picked from commit 547c65846c8b4c1b6fc4e45b127cdebda93ea00b)

* 4.9.1 bugfix release

* Back to -dev

Co-authored-by: Stephen Lyons <slysven@virginmedia.com>
Co-authored-by: Gustavo Sousa <gustavocms@gmail.com>
Co-authored-by: Manuel Wegmann <60551052+Edru2@users.noreply.github.com>

* (autocommit) Updated autocompletion data (#3919)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Enhance: make compact input line feature act on individual profiles and be saved for each profile (#3866)

This message is an edited compilation of the individual commits that
made up the eventual squashed and merged PR:

Makes the compact input line a toggle (so now it also has constant text).
The previous code only considered the currently active profile which
was contradicted by the fact that the state - which was maintained
between sessions - was stored centrally as an application setting rather
than a per profile one.

This was split out of a larger PR that originally included it:
https://github.com/Mudlet/Mudlet/pull/3844 .

Because of the poor tracking of `(Host*) mudlet::mCurrentActiveHost`
the use of the short-cut or menu item to toggle the state of the input line
did not fully track which profile is active yet. That was improved when
PR 3844  went in.

BugFix: clicking on a different profile needs to update compact input line

Although clicking on the tab bar changed the currently active host and that
would update the compact input line menu item state to match the newly made
active profile the same thing was not happening if the profile was made
active by being clicked on in other places when in multi-view. This was
only discovered after PR 3844 was applied.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* New Crowdin translations (#3894)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (German)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* Show an echo when uploading (#3858)

* Fix crash importing custom lines with Qt 5.14+ (#3923)

* Client.Media: Remove Camel Case Package Requirement (#3925)

* Remove Camel Case Requirement from Client.Media

* Remove Camel Case Requirement from Client.Media

* Don't call Lua functions with too many arguments (#3924)

* Don't call Lua functions with too many arguments

* Show a warning when trimming

* Fix bug in parsing MXP tag with = symbol in attribute value (#3933)

* (autocommit) Updated text for translation (#3936)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* More concise tooltip for compact input line (#3937)

* Revise: prevent multiple connection dialogues

This will close Issue: #2706.

Also fix a couple of warnings for the `dlgConnectionProfiles` class:
* an out of order initialisation list
* an unused argument in:
 `(void) dlgConnectionProfiles::slot_update_name(const QString&)`

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Remove Default Host code from IRC (#3927)

* Ensure `dlgIRC::mIsDefaultIrcClient` is set when IRC init from Lua.
This addresses some code that should be removed all together, since we no longer use IRC as a main help-chat in favor of Discord.

* Remove cruft code entirely.

* Forget about mudlet.cpp changes and break the build ;)

* enable/disable IRC client options with host.

* Add the keepColor option to replaceAll and replaceWildcard (#3943)

* Add the keepColor options to replaceAll finally
* Add it to replaceWildcard too

* Donot resize item in HBox/VBox if not dynamic (#3947)

* BugFix: HBoxes and VBoxes should not change height or width if the policy for that constraint is not dynamic
* Only call resize if the value has changed
* Don't forget the % in the comparison
* fixed/dynamic mixed suggestion
* Update GeyserVBox.lua
* Reset contains_fixed at start of organize loop so it changes if all fixed items have been removed
* And for VBox
* Add comment
Co-authored-by: Edru2 <alyven_87@hotmail.com>

* Skip downloading GET response if there's no file path (#3932)

* Enhance: prevent password sniffing from sysDataSendEvent (#3928)

This revises cTelnet::sendData(...) so that it does NOT create a
`sysDataSendRequest` with the password when called from:
`cTelnet::slot_send_pass()` .

Also, in passing also found that similar mudlet class slot methods:
`mudlet::::slot_send_login()` and `mudlet::::slot_send_pass()` are not used
so can be pruned and then three `QQueue<QString>` in that same class are
not used either.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* BugFix: make date display of profile's history follow selected UI locale (#3917)

* BugFix: make date display of profile's history follow selected UI locale

This PR adds a `QLocale` object to the `mudlet` class that is set to the
user's selection of UI locale (language + country) so that items that need
to return data in a locale aware form can use:
`(const QLocale&) mudlet::getUserLocale()`
in order to present their information in their selected form rather than
using what they or their OS/DE has set system/desktop-wide.

In this PR it is used to format and present in the correct language the
date and time entries for the profile's history but it can be used
elsewhere within the Mudlet application as needed.

Also:
* reorder some items in `dlgConnectionProfile`'s class to be correct.
* mark an unused argument in `dlgConnectionProfile::slot_update_name(...)`
as unused to prevent a warning.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: exclude the display of a time zone in the profile's history

It takes up extra space which is tight in that widget and (apart from the
time around a DST change) does not impart much information to the display.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Apply suggestions from code review

Removed unwanted ellipses from debug texts...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Refactor: remove minute visible name from Connection dialogue icons

We have been trying to hide the text associated with the `QListWidgetItems`
in the connection dialogue by setting the font size to the minimum of `1`
and by setting it's colour to be white. This is not effective when the
background is not white - which is likely for a "Dark" desktop environment.
The only way to successfully hide the text is, I think, to not have any!

However the text was being used programmatically, so the best way to use
a `QListWidget` in this mannar is to store the text elsewhere in each
item's structure. Fortunately Qt provides for this with the user data
functionality which allows multiple data items (based on the `QVariant`
class) to be stored within each `QListWidgetItem` using an integer key to
denote the type of the data. Ironically the text, icon and other details
for each item are ALSO stored in this way - however for non-Qt internal
use the lowest integer key that is to be used is `Qt::UserRole` - which
I have assigned to the `(const int) dlgConnectionProfiles::csmNameRole`
static value. It is quite possible that a redesign of the Connect Profiles
dialogue may use this system to store/cache more details about each profile
in the future!

The only issue with this is the lack of a:
`QListWidget::findData(const QVarient&data, int role = Qt::UserRole ...)`
method (c.f. `QComboBox::findData(...)`) so I have had to provide a:
`(QList<QListWidgetItem*>) findData(const QListWidget&, const QVariant&,
                                      const int role = Qt::UserRole) const;
method to fill in this gap and to replace the previous
`QListWidget::find(...)` that examined each item's text.

Also removed local `(QString) profile` from:
`(void) dlgConnectionProfiles::slot_item_clicked(QListWidgetItem*)` as it
is merely a redundent duplicate of another local `(QString) profile_name`.

Renamed local `(QListWidgetItem*) pM` from:
`(void) dlgConnectionProfiles::fillout_form()` to:
`(QListWidgetItem*) pItem` as that reflects the name used throughout the
rest of the class for this type of variable.

Changed a `(QLabel*)::setText(tr(""))` call to the more explicit and less
stupid `(QLabel*)::clear()`. Similarly changed a
`(QWidget*)::setToolTip("")` to a `(QWidget*)::setToolTip(QString())`.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* New Crowdin updates (#3921)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* (autocommit) Updated text for translation (#3949)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update src/dlgConnectionProfiles.cpp

Remove unneeded command as per peer-review suggestion.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: src/dlgConnectionProfiles.h

CodeFactor says that the `static` keyword should come first (before the `const` one).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* (autocommit) Updated autocompletion data (#3954)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated edbee-lib submodule to latest in our fork (#3953)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update: add a couple of new dictionaries to the set that Mudlet recognises

This is so that a text is displayed instead of a fall-back of the locale
code.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* BugFix: announce end of replays when run from replay button

I got the logic reversed in the original #1519 for
`(bool) cTelnet::mmIsReplayRunFromLua` so the ending message was not being
displayed when it should have been.

This will close #2793.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Add dummy functions for TTS if Mudlet was compiled with TTS disabled (#3958)

* Update Linux builds to Qt 5.12.9 (#3959)

* Update Linux builds to Qt 5.12.9

* Update .travis.yml

* Bugfix for string.split with too many characters (#3963)

* Allow string.split("my string", "") with strings > 32 characters
Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* (autocommit) Updated text for translation (#3968)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update discordapp.com to discord.com (#3979)

* Capitalise 'errors' button text (#3987)

* Avoid new ptb if no new commit (#3990)

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* Update build-mudlet.yml (#3991)

* Add cfeedTriggers, dfeedTriggers, and hfeedTriggers (#3974)

* Add cfeedTriggers, dfeedTriggers, and hfeedTriggers
* add apt update back to linux github build runner
* Giving in because too tired to argue

* Server Data Encoding Selection via Telnet CHARSET (#3972)

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* (autocommit) Updated text for translation (#3995)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated autocompletion data (#3996)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Missing files in src/.gitignore (#3997)

* NAWS width handling & reporting (#4002)

* Add Geyser.MiniConsole:display() (#3993)

* Fix typo preventing use of getFg/BgColor on non-main consoles. (#3982)

* (autocommit) Updated autocompletion data (#4006)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Zoom via mouse wheel: keep the position under the cursor in place (#3998)

* Zoom centered on the mouse position

Zooming via the scroll wheel now keeps the position under the curser in
place.

* QT <5.14 compatibility

* Use an exponential factor when zooming

This makes the zoom experience a lot smoother: the step size no longer
depends on how close you're zoomed in.

* Add a separate getHTTP operation and associated events (#4003)

* Add a separate GET operation

Sometimes you just need to read some data from the HTTP server without
going through writing the response to a file.

Also, when a POST redirects to a GET, the reply was lost.

Thus this change introduces a dedicated "getHTTP" function, and a
"sysGetHttpDone" event that contains the actual data.

* Two error messages had the wrong function name

* Bugfix: GET error should receive the URL

Also adds the URL to the download error, as an additional argument

* Grammar and style fix

per comment from SlySven

* bugfix: generic_mapper map config errors (#3971)

* bugfix: Correct help variable for map config

This makes calling `map config` without a specifier work as intended in the trigger.

* Restore map.help.configs to singular

Revert 7b8d532

* bugfix: Point map config alias to correct help

making the #3970 fix in the script broke `map help config`. because the `show_help` function parses the user supplied argument, the script's so-called "help file" needs to have the same singular title as the requested argument. thus, this commit points `map config` to `map.help.config` when the alias is called without argument and also retains the intended `map help config` feature.

* ci: enable sudo apt update

* ci: Re-disable apt update

* Special macOS icons (#3829)

* New macOS .icns icon files

* wire in new macOS icons

Co-authored-by: Kebap <kebap_spam@gmx.net>

* Return table of useful things in HTTP response (#3727)

* Return table of headers in HTTP responses

* Apply code review suggestions

* Make sure to free data stored in lua registry by events

* Try including optional here

* Include optional in both h and cpp files

* Work around OS X limitation https://stackoverflow.com/a/44244070/2197402

* Remove what I now think to be a superfluous include

* Make headerList a const a different way

* Follow the Mudlet convention for how to convert this to const char *

* Put the headers table in a table

* Put the cookies table in a table

* Include QNetworkCookieJar so compiler knows more about the type

* Include QNetworkCookie so compiler knows more about the type

* New Crowdin updates (#3950)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (German)

* (autocommit) Updated autocompletion data (#4011)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Update widechar_width.h to latest upstream (#4010)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Revise: reorder tabs and tab stops in profile preferences (#3929)

Switch some uses of QGridLayout <==> QVBoxLayout depending on whether there
is more or only one column of items.

Moved the "Special options" tab to the last position.

Switch some single columns of items to become two columns so that the
overall vertical size needed for the dialogue can be reduced.

Moved the Discord and IRC options to a new tab "Chat".

These last two are important as they allow the overall dialogue to be
smaller and thus may enable us to close: #3467, #3304.

Removed unused groupBox that has something about deleting map backups. It
is not handled or mentioned in the current code at all and just sits there
as a disabled widget in the mapper tab.

Revise: try to make the preferences dialogue narrower

Set the initial size to be the smallest I can get in use on my Linux
Desktop - others' mileage may vary!

Revise: tweak some texts in accordance with peer-review suggestions

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Support for parsing MXP closing prefixed closing tags used in Materia Magica (#4016)

- Workaround for parsing tags in the format `<scripted_action>x<x/scripted_action>`

* Fixes issue on miniconsoles using link store from the main console (#4017)

* Refactor to create and expose decho2ansi and hecho2ansi functionality (#4019)

* Revise: try and identify profiles and some controls in connection dialog (#3966)

Also convert all `setDisabled(state)` to `setEnabled(!state)` in the
`dlgConnectionProfiles` class - using a single one instead of a mix of the
two is less likely to lead to errors - and it means less effort to search
for the places where something is being enabled or disabled.

Shorten some overlong variable names.

Remove some capitalisations.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* BugFix: restore L. yellow colour button + insert new control in tab order

Due to a numbering error the button used to set the ANSI colour for Light
Yellow for the profile's console was positioned to be on top of the Light
Green one. This was introduced by my #3929 a few days ago!

Also insert a recently added checkbox (force Telnet CHARSET negotiation
off) did not have a tab order specified so navigating around the
preferences dialog with the tab key would not visit it in the right
sequence.

For consistency the order of the main console font size and anti-aliasing
checkbox needed to be swapped over.

To allow both PRs #3952 and #3832 to merge in where they both add in a new
(different) control into the `gridLayout_groupBox_debug` layout in the
"Special options" tab of the profile preferences dialogue a gap has
been left in row 3 of that layout which will be used by the latter of those
two PRs (the other one will add a new row to the end).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* (autocommit) Updated autocompletion data (#4025)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated text for translation (#4024)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Revise: minor change post PR #3966

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Making the foreground section of the hex pattern a noncapturing group allows for only setting the background via hecho/etc. (#4027)

* MXP to MSP Tags (#4015)

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* test/CMakeLists.txt update

* test/CMakeLists.txt update backout

* test/CMakeLists.txt update

* Fix bresetProfile() #3692 (#4020)

* fixes resetProfile()

units need to be enabled to be compiled
the order was wrong

* timers were not re-compiled

* TimerUnit compileAll will now really compile all timers

TimerUnit compileAll didn't compile all timers but only the ones in the rootnode what means that timers in a folder weren't compiled at all

* fix eventhandler not loading after resetProfile()

* (autocommit) Updated text for translation (#4033)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Found a typo where rb and gb were not made local (#4036)

* Allow text color manipulation by StyleSheet on Geyser.Labels (#4042)

* Allow text color manipulation by StyleSheet on Geyser Labels

* cosmetic suggestion and rawEcho

* Introduce purgeMediaCache() [MCMP & MSP] (#4041)

* Introduce purgeAllMediaFiles()

* Introduce purgeMediaCache()

* Updating lua-function-list

* Removed TMedia:: prefix (SlySven)

* Enhance: enable builds in a full Windows MSYS2 environment (#3889)

* Enhance: enable builds in a full Windows MSYS2 environment (QMake only)

By defining `WITH_MAIN_BUILD_SYSTEM` to the value `NO` this PR makes enough
changes to the qmake project file to enable Mudlet to be compiled in a full
MSYS2 development environment (in the MSYS2 Qt Creator) - this will enable
easier development by Windows users (particularly those who also have some
familiarity with *nix systems) as I have documented at:
"Compiling on Windows 7+ (MSYS2_Alternative)" but it seems that the URL is
causing GitHub to forget about the PR as it seems to push and is recorded
in my local repository but never actually lands there!

It also makes some changes to the setting up of the LUA package paths for
the lua code formatter so that the paths are all entered with Unix style
directory separators but converted to whatever the Lua package handler is
set to use. In a Windows environment it is not unheard of to get both '\'
and '/' being used within the same path as different parts get generated
in stages - and using the backslash one can produce surprising error
messages if the back slash is not properly escaped when displaying those
messages in the main console or elsewhere (they dissappear entirely or
end up escaping following characters producing misleading information).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Update src/mudlet.pro

BugFix: fix a typo in qmake project file.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: reduce almost duplicate comments

Fix an addition to the `package.cpath` which would not have worked as it
did not specify the file extension which is OS dependent.

Also remove LuaJIT remenent, which we dropped support for a long time back.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Apply suggestions from code review

Revise: fix an error in a comment.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: take out some pre-processor stuff as run-time code works without it

I was a bit sceptical at first but it *seems* to work.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Enhance: modifications to get CMake working on Windows

Revise a Mudlet specific CMake macro to not include the word "module" as
that is not appropriate for all usages now.

Fix an obscure CMake build error caused by the use of:
`LIBRARYNAME::LIBRARYNAME` in `target_link_libraries(...)` which is the
form for an interface usage of a library - this causes a failure of the
build with an error message of the form:
`src/CMakeFiles/mudlet.dir/build.make:1954: *** target pattern contains
no '%'.  Stop.` that line is actually one about one of the libraries
concerned - and it is the first one which shows up in that file with a
LIBRARYNAME-NOTFOUND entry. The fix seems to be to use only a LIBRARYNAME
form.

Fix a problem in `(static QString) mudlet::getShortPathName(const QString&
name)` which is cause by a Windows specific function that takes.returns
template/typedef type arguments which only work if the symbols
`UNICODE` and `_UNICODE` to be defined and which aren't in an MSYS2/
Mingw-w64 environment.

Revise some usages of the APP_BUILD defined value so that they are
handled correctly (using `QStringLiteral`/`QByteArray` wrapppers).

Change the CMake find module for Pugixml so that it uses a variable name in
ALL_UPPER_CASE to remove a developer warning about using a mixed case one.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Edit: fix copy paste issue

I thought something needed to be more conditional than it was but didn't
get it undone in last commit.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Refactor: simplify the code to set up the Lua/C additional paths for LCF

Peer-review suggested I needed to shrink the code.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: shrink some comments

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: implement some changes requested by peer-review

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: shorten multi-line comment in initIndenterGlobals()

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: further change suggested in peer-review

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Fix recognition of static libraries in own Find modules

Co-authored-by: keneanung <keneanung@googlemail.com>

* BugFix: repair failure to load Lua modules from profile directory (#4051)

This was introduced by PR #3889 which was using a function defined in the
LuaGlobal.lua file before it was loaded! The function definition has been
moved to be within the TLuaInterpreter class C++ code and, as it is now
present in two places, refactored out to a helper method so it can be
loaded into both the main and the lua code formatter Lua interpreters.

This should close #4047.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* (autocommit) Updated text for translation (#4049)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Fixed offset and scrollbars nestedLabels (#4043)

offset was calculated wrong for some combinations and the scrollbars didn't work and had a variable leaking to global

* (autocommit) Updated autocompletion data (#4059)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Math in Geyser constraints (#4056)

* get rid of loadstring and more resizing possibilities

* Update GeyserGeyser.lua

* now really working

* function values update on window resize

There was an issue that function values didn't update on window resize but only when the elemen was resized moved.
This is fixed now.

* Fix Geyser HBox/VBox in development (#4057)

* BugFix: TTYPE error

I introduced this error in #3889 and it was reported in, and this PR
will close #4066.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Ignore Qt Creator autosave files (#4068)

* Add custom Input/Command lines (#4055)

* createCommandLine + Geyser.CommandLine

* subcommandline event / Geyser.CommandLine:setAction

* setWindow crash

setWindow was crashing due to wrong assignment

* add ConsoleCmdLine to MiniConsoles

trying to please codefactor.
Geyser doc had a copy/paste fail.
added a workaround for cursor not visible in some situations like if writing to much text in the commandline

Added ConsoleCmdLine to miniconsoles + geyser

* get rid of the event and introduce set/resetCmdLineAction

* code factor

* fix commandline dissapearing on resize

* fix issue with focus and resize of MiniConsoles when using custom command lines (#4073)

* fix focus and resize of MiniConsole command lines

* get it to work also for UserWindows

* Update generic_mapper.xml (#4075)

* Update the port on StickMUD to use TLS (#4072)

* Geyser.Label rightClick menu (#4054)

* Geyser.Label rightClick menu

gives labels the possibility to have a right click menu

* added rightclickmenu to adjustable.container

* darkmode for adjustable.container

* writing docs and got rid of configmenuLabel

* set StyleSheet for UserWindows (border and title area) (#4046)

* setUserWindowStyle (primitive and Geyser)

* fix autoDock

* Revert "fix autoDock"

This reverts commit c0b1b7a3159818fb307e6a09b3e2b928a650dfb1.

* fix autodock (#4048)

* Allow Geyser containers to have height/width 0 (#4078)

* calculated_width 1 if 0

* same for vbox

* calculated size dynamic

* make code cleaner

* allow adjustable container to load in userwindow (#4037)

* Allow attached Adjustable.Containers to behave like a frame  (#4032)

* MainWindow border margin for attached Adjustable.Containers

* add attachedMargin to the docs

* connectToBorder() disconnect() addConnectMenu()

Allows you to connect your attached adjustable.container to a border which means that it behaves like the border is a frame.
Makes very similar GUI to GUIFrame possible.

* better ConnectMenu + localization

use of new right click menu to make the connectMenu better looking and userfriendlier

* Remove mapper click workaround (#4076)

* Allow different save/load directories and slots for Adjustable.Container settings  (#4053)

* add slot and dir to save/load settings of Adjustable.Containers

* save slot in one file + deleteSaveFile + defaultDirectory

* conflict solved changeContainer also working with slots

* check if attached before trying to detach

* BugFix: prevent Segmentation Faults when closing profile with toolbars

I was getting this error when closing one profile with a tool-bar when
multi-playing. Not sure of the exact cause (other than the toolbar did NOT
have a particular {meta}property - but was trying to convert the
non-existent `QVariant` that would represent it to a Boolean value) but
this should prevent a fatal application crash should it occur again...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Fix PTB build generation (#4081)

* Move commit date logic to earler

* Use commit date instead of author date

* Add background image to mini/main console (#4064)

* first success

* add background image to miniconsole transparency for cecho,decho,hecho

Added ability to add background image to miniconsole.
cecho, hecho, decho support transparency now

* add image also to main console

+ use mpBackground for backgroundcolors
to increase performance

* Update TLuaInterpreter.cpp

* give splitter palette to solve issue with darktheme

darktheme was able to change the background if the splitter had no color set.
this is fixed now

* still darktheme issue

* elements were hidden behind the background (fixed)

* resetBgImage BgImageModes and code suggestions

* change order for :lower as it caused strange issues

* Geyser MiniConsole set/resetBackgroundImage update

* (autocommit) Updated autocompletion data (#4034)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Fix links clickable on the whole console width (#4083)

* prevent links to use full console width

prevent links to use full console width by checking if the mouse is out off the right bound

* make isOutOffBound non-optional

* change isOutOffBound to isOutOffbounds

* typo

* Add horizontal scrollbar to error-console (#4063)

* add scrollbar to errorconsole

* add horizontal scrollbar to error console

* hide if not needed

* update horizontal scrollbar on redrawing

* selection works even if scrolled to the right

* added suggestions and selecting is visible now

* add suggested code changes

* Update TTextEdit.cpp

* these are obsolte due to the background-image pr

these are not needed anymore and could cause a performance issue

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* (autocommit) Updated autocompletion data (#4084)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Setup Mudlet for C++ Github Codespaces (#4087)

* Valgrind complained about an uninitialized field. (#4090)

* Improve generic mapper triggers (#4086)

* New Crowdin updates (#4009)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet-lua.json (French)

* New translations mudlet-lua.json (Russian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Italian)

* New translations mudlet-lua.json (German)

* New translations mudlet-lua.json (Italian)

* New translations mudlet-lua.json (German)

* New translations mudlet.ts (German)

* New translations mudlet-lua.json (English, United Kingdom)

* New translations mudlet-lua.json (Russian)

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* Open Mudlet remotely using Github Codespaces (#4088)

* Improve codespaces setup

* Added libqt5opengl5-dev

* Forward vnc port 5900 by default

* Install Lua dependencies

* Add script to run Debian UI

* Fix schellcheck warning

* Update Dockerfile with desktop Debian instructions

* Updated devcontainer.json with desktop Debian

* Fix Dockerfile linter

* Fix spelling in the Dockerfile (#4094)

* ansi2string to strip ANSI colours (#4092)

* Install CMake tools as well for Github Codespace (#4096)

* Update Codespaces remote connect password (#4097)

* BugFix: handle floating toolbars with no DockArea set

I discovered I had a problem with this when working on something else with
an existing profile. The result was that the toolbar concerned was not
added to the main window. This PR forces a resolution to this by reapplying
the toolbar to the default left DockWidgetArea if no previous one seemed to
be set.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Bugfix: handling of Big5 encodings for ambiguous E Asian auto-widening (#4030)

When the preference that controlled the E. Asian widening was set to "Auto"
it was not being correctly detected as the wrong `QByteArray` strings were
being checked against the currently selected Game Server encoding setting.
This would mean that both the variants that Mudlet offered would be using
the "Normal"/"Narrow" wide for such ambiguous graphemes rather than the
"Wide" that was intended.

Also, there were some places in the `TLuaInterpreter` class where the
encoding details were being treated as `QString`s rather than the
`QByteArray` that is used specifically to match up with Qt's own usage,
and avoid the whole `QStringLiteral(...)`/`QObject::tr(...)` wrapper issue
that arises from the use of `QString`...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* fix ctrl crash (#4098)

* Add a global event listener: `*` and Lua interpreter cleanup (#4091)

* pGlobalLua cannot be NULL

* Don't clear the stack

Internal functions should leave the stack as they found it.
Clearing it is not intuitive and in fact causes crashes.

* Clean up MSSP event generation

That loop is obfuscating the code.

* Add a "*" wildcard event subscription.

* Teach the Lua event dispatcher about "*"

This requires registering the Lua dispatcher to "*" instead of every
single event type. Otherwise as soon as somebody wants all events
every dispatcher would be called twice.

* Use a constant string

* Use upper pane height for page scroll (#4099)

* use upperPane for page scrolling

* screenheight was private

* removeAction was missing when parent was deleted (#4101)

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* Fix right-click menu and image copy (#4102)

* restore old behaviour

restore old behaviour for right click menu and for the
image copy

* add bg color to image copy

bg color was always black in image copy.
Now it's completly the old behaviour

* Fix release version numbers in windows installers

* Fix typo in mapper's area box warning (#4106)

* Fix macOS packaging (#4103)

* Try brew update-reset instead of update

* Use brew-update-reset branch

* Back to brew update

* Revert "Back to brew update"

This reverts commit 84e00b69675bf1f635c50de1776a6a710c51e156.

* Update travis.osx.after_success.sh

* Update travis.osx.before_install.sh

* Update travis.osx.before_install.sh

* One last time, try brew update-reset

* Fix typo (#4110)

* ok

* Revise: add build details in development QApplication::ApplicationVersion (#35)

Also add indication of bitness in QApplication::ApplicationName for Windows
builds.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

Co-authored-by: Stephen Lyons <slysven@virginmedia.com>

Co-authored-by: mudlet-machine-account <39947211+mudlet-machine-account@users.noreply.github.com>
Co-authored-by: Manuel Wegmann <60551052+Edru2@users.noreply.github.com>
Co-authored-by: Kebap <leckerkebap@gmx.li>
Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
Co-authored-by: Stephen Lyons <slysven@virginmedia.com>
Co-authored-by: Gustavo Sousa <gustavocms@gmail.com>
Co-authored-by: Eraene <wisps.of.time@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>
Co-authored-by: Damian Monogue <3660+demonnic@users.noreply.github.com>
Co-authored-by: Ian Adkins <ieadkins@gmail.com>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Mike Conley <sousesider@gmail.com>
Co-authored-by: Fae <itsthefae@gmail.com>
Co-authored-by: Jonathan Mohrbacher <johnnymo87@gmail.com>
Co-authored-by: keneanung <keneanung@googlemail.com>
Co-authored-by: Matthias Urlichs <matthias@urlichs.de>
Co-authored-by: Stack <stack@ilpdev.com>
Co-authored-by: Kebap <kebap_spam@gmx.net>
atari2600tim added a commit to atari2600tim/Mudlet that referenced this pull request Oct 1, 2020
* New Crowdin translations (#3859)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Russian)

* New translations mudlet-lua.json (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Pirate English)

* New translations mudlet-lua.json (Portuguese, Brazilian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Portuguese)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Greek)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet-lua.json (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Pirate English)

* New translations mudlet-lua.json (Portuguese, Brazilian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Portuguese)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Greek)

* New translations mudlet.ts (Pirate English)

* New translations mudlet-lua.json (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Pirate English)

* New translations mudlet-lua.json (Portuguese, Brazilian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Portuguese)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Greek)

* New translations mudlet.ts (Pirate English)

* Lua translations able to deal with empty strings (#3878)

* deal with empty strings

* Update src/mudlet-lua/lua/Other.lua

Co-authored-by: Kebap <leckerkebap@gmx.li>

Co-authored-by: Kebap <leckerkebap@gmx.li>
Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* BugFix: prevent crashes from recent Coverity Issue fixup

I was trying to be too clever and return a reference to an object.
I think I might have been able to extend the life-time of the item
concerned if I had made it a `const` but all in all it is simpler just to
use the normal return action that a compiler can use RVO to avoid making a
unneeded copy of the item.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Port QStringRef to QStringView (#3879)

* Fix for case insensitivity in exit line (#3875)

* Enhance: make multiView persistent (#3844)

* Enhance: make multiView persistent & compact input line act on all profiles

Makes the compact input line a toggle (so now it also has constant text).

Makes the multi-view stay active when `<Ctrl>+<Tab>` / `<Ctrl>+Number`
switching between - or clicking on the tab bars.

Also disables the (now a toggle) control for multi-view when there is less
than two profiles active.

This should close #1111 #1831 #3136 #3204 #2400, it may also improve #2099

It also disables dragging the tabs around so will prevent the issue
mentioned in #1456 pending a fix that can also rearrange the main
`TConsole`s to match.

Also improve layout of the Multi-view tool-tip for both the toolbar and
menu instances of the control.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revoke: remove changes disassociated with the multi-view issues

Required to simplify this PR and so they can be moved to a separate
PR.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Enhance: improve active tab indication in multi-view

Examining the situations in which clicking on a part of the UI does not
cause the indication of the active tab to reflect the profile that the
widget is part of has shown a few places which are addressed in this
commit:
* 2D Mapper
* 3D Mapper
* Search term entry widget in the commandl ine
* either `TTextEdit` in the Main or User Window `TConsole`
* `TLabels` in any `TConsole`

All of the above will now call a new mudlet::activateProfile(Host*) which
will ensure that the correct tab is selected, and that the member:
`(Host*) mudlet::mpCurrentActiveHost` is updated to also reflect that.

Also, if multi-view is active than there is not need to highlight the
tabs of profiles that have seen any changes - which is just as well as the
code to clear the tab is dependent on the user clicking on the affected
tab to show the tab and clear it - which is less likely to happen when in
the multi-view mode.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers (#3890)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers

As the Travis MacOs CI builds are using the latest libzip which is
currently the one which doesn't have LIBZIP_MAJOR and other version numbers
they were encountering a #error situation and aborting the build.

This is being fixed upstream so 1.70.1 should be okay.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Check for defines of LIBZIP_VERSION_MINOR

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* (autocommit) Updated text for translation (#3887)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated IRE mapping script to latest upstream (#3885)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update development with 4.9 release (#3897)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers (#3890)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers

As the Travis MacOs CI builds are using the latest libzip which is
currently the one which doesn't have LIBZIP_MAJOR and other version numbers
they were encountering a #error situation and aborting the build.

This is being fixed upstream so 1.70.1 should be okay.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Check for defines of LIBZIP_VERSION_MINOR

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
(cherry picked from commit bcbf8a0b4739e308d83ae592d98465358b642863)

* 4.9.0 release!

* Back to -dev

Co-authored-by: Stephen Lyons <slysven@virginmedia.com>

* Fix crash loading MMP map (#3899)

* Add spairs which iterates over any table in a sorted fashion (#3895)

* Adding spairs function for iterating over tables in a sorted fashion. Also adding tests for same

* Minor test change just to force appveyor to start over

* Add: getClipboardText and setClipboardText Lua functions (#3869)

* Added getClipboardText and setClipboardText functions to allow scripts to interact with the clipboard.

* A little bit of arranging so this code is matching the style of other Lua functions.

* Added references to the function's pages on the wiki.

* Revise: improve Variables icon (#3892)

This adds a white outline around the otherwise entirely black icons so that
they becomes visible when used with a dark desktop theme.

For the record this icon was created from scratch on a 256x256 transparent
background using The G.I.M.P. to draw "X=" in text in black using the
"Serif" or "Sans serif" font at a size of 150 (for two of the text based ones
the third had to be reduced to fit), that image was then redrawn in white four
times and each of them was offset by +/-4 in complimentary X and Y
directions (and the gaps at the ends filled in and blurred) so that they
expanded the background white around the black foreground.

The reason for expanding from the original 48x48 pixel size was to make the
anti-aliasing take up a much smaller proportion of the image - so it will
appear sharper even at higher resolutions.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* [ImgBot] Optimize images (#3910)

*Total -- 150.01kb -> 128.86kb (14.1%)

/src/icons/variables.png -- 15.69kb -> 7.79kb (50.32%)
/src/icons/table.png -- 1.60kb -> 0.85kb (46.89%)
/src/icons/function.png -- 39.66kb -> 31.92kb (19.53%)
/src/icons/variable.png -- 30.14kb -> 26.13kb (13.31%)
/src/icons/mudlet_ptb_256px.png -- 62.92kb -> 62.16kb (1.2%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

* Fixes #3900, bug on MXP SEND tags (#3908)

- Bug was caused by index out of range when processing MXP SEND tags with more commands than associated hints
- The solution uses HREF instead of HINT when the number of available hints is one and smaller than the number of commands

* Fix for Geyser HBox/VBox with width/height at 0 (#3909)

* prevent height/width of 0

* better solution still keeps hbox at 0

* small correction

* Fixes bug #3886 with links in miniconsoles (#3904)

- In TTextEdit code was looking for links and tooltips associated to the main console

* Update development with 4.9.1 release (#3911)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers (#3890)

* Bugfix: prevent build failure with libzip 1.70.0 with no version numbers

As the Travis MacOs CI builds are using the latest libzip which is
currently the one which doesn't have LIBZIP_MAJOR and other version numbers
they were encountering a #error situation and aborting the build.

This is being fixed upstream so 1.70.1 should be okay.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Check for defines of LIBZIP_VERSION_MINOR

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
(cherry picked from commit bcbf8a0b4739e308d83ae592d98465358b642863)

* 4.9.0 release!

* Back to -dev

* Fix crash loading MMP map (#3899)

(cherry picked from commit 510c3be7b7cf421fd7143883bff65763d531de2b)

* Fixes #3900, bug on MXP SEND tags (#3908)

- Bug was caused by index out of range when processing MXP SEND tags with more commands than associated hints
- The solution uses HREF instead of HINT when the number of available hints is one and smaller than the number of commands

(cherry picked from commit 46320c31355e5a797f57e04d23774caf269cb7cd)

* Fix for Geyser HBox/VBox with width/height at 0 (#3909)

* prevent height/width of 0

* better solution still keeps hbox at 0

* small correction

(cherry picked from commit a7dc3a22d2928f9b6020ec482bedfa65a8f4c85f)

* Fixes bug #3886 with links in miniconsoles (#3904)

- In TTextEdit code was looking for links and tooltips associated to the main console

(cherry picked from commit 547c65846c8b4c1b6fc4e45b127cdebda93ea00b)

* 4.9.1 bugfix release

* Back to -dev

Co-authored-by: Stephen Lyons <slysven@virginmedia.com>
Co-authored-by: Gustavo Sousa <gustavocms@gmail.com>
Co-authored-by: Manuel Wegmann <60551052+Edru2@users.noreply.github.com>

* (autocommit) Updated autocompletion data (#3919)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Enhance: make compact input line feature act on individual profiles and be saved for each profile (#3866)

This message is an edited compilation of the individual commits that
made up the eventual squashed and merged PR:

Makes the compact input line a toggle (so now it also has constant text).
The previous code only considered the currently active profile which
was contradicted by the fact that the state - which was maintained
between sessions - was stored centrally as an application setting rather
than a per profile one.

This was split out of a larger PR that originally included it:
https://github.com/Mudlet/Mudlet/pull/3844 .

Because of the poor tracking of `(Host*) mudlet::mCurrentActiveHost`
the use of the short-cut or menu item to toggle the state of the input line
did not fully track which profile is active yet. That was improved when
PR 3844  went in.

BugFix: clicking on a different profile needs to update compact input line

Although clicking on the tab bar changed the currently active host and that
would update the compact input line menu item state to match the newly made
active profile the same thing was not happening if the profile was made
active by being clicked on in other places when in multi-view. This was
only discovered after PR 3844 was applied.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* New Crowdin translations (#3894)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (German)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Simplified)

* Show an echo when uploading (#3858)

* Fix crash importing custom lines with Qt 5.14+ (#3923)

* Client.Media: Remove Camel Case Package Requirement (#3925)

* Remove Camel Case Requirement from Client.Media

* Remove Camel Case Requirement from Client.Media

* Don't call Lua functions with too many arguments (#3924)

* Don't call Lua functions with too many arguments

* Show a warning when trimming

* Fix bug in parsing MXP tag with = symbol in attribute value (#3933)

* (autocommit) Updated text for translation (#3936)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* More concise tooltip for compact input line (#3937)

* Revise: prevent multiple connection dialogues

This will close Issue: #2706.

Also fix a couple of warnings for the `dlgConnectionProfiles` class:
* an out of order initialisation list
* an unused argument in:
 `(void) dlgConnectionProfiles::slot_update_name(const QString&)`

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Remove Default Host code from IRC (#3927)

* Ensure `dlgIRC::mIsDefaultIrcClient` is set when IRC init from Lua.
This addresses some code that should be removed all together, since we no longer use IRC as a main help-chat in favor of Discord.

* Remove cruft code entirely.

* Forget about mudlet.cpp changes and break the build ;)

* enable/disable IRC client options with host.

* Add the keepColor option to replaceAll and replaceWildcard (#3943)

* Add the keepColor options to replaceAll finally
* Add it to replaceWildcard too

* Donot resize item in HBox/VBox if not dynamic (#3947)

* BugFix: HBoxes and VBoxes should not change height or width if the policy for that constraint is not dynamic
* Only call resize if the value has changed
* Don't forget the % in the comparison
* fixed/dynamic mixed suggestion
* Update GeyserVBox.lua
* Reset contains_fixed at start of organize loop so it changes if all fixed items have been removed
* And for VBox
* Add comment
Co-authored-by: Edru2 <alyven_87@hotmail.com>

* Skip downloading GET response if there's no file path (#3932)

* Enhance: prevent password sniffing from sysDataSendEvent (#3928)

This revises cTelnet::sendData(...) so that it does NOT create a
`sysDataSendRequest` with the password when called from:
`cTelnet::slot_send_pass()` .

Also, in passing also found that similar mudlet class slot methods:
`mudlet::::slot_send_login()` and `mudlet::::slot_send_pass()` are not used
so can be pruned and then three `QQueue<QString>` in that same class are
not used either.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* BugFix: make date display of profile's history follow selected UI locale (#3917)

* BugFix: make date display of profile's history follow selected UI locale

This PR adds a `QLocale` object to the `mudlet` class that is set to the
user's selection of UI locale (language + country) so that items that need
to return data in a locale aware form can use:
`(const QLocale&) mudlet::getUserLocale()`
in order to present their information in their selected form rather than
using what they or their OS/DE has set system/desktop-wide.

In this PR it is used to format and present in the correct language the
date and time entries for the profile's history but it can be used
elsewhere within the Mudlet application as needed.

Also:
* reorder some items in `dlgConnectionProfile`'s class to be correct.
* mark an unused argument in `dlgConnectionProfile::slot_update_name(...)`
as unused to prevent a warning.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: exclude the display of a time zone in the profile's history

It takes up extra space which is tight in that widget and (apart from the
time around a DST change) does not impart much information to the display.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Apply suggestions from code review

Removed unwanted ellipses from debug texts...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Refactor: remove minute visible name from Connection dialogue icons

We have been trying to hide the text associated with the `QListWidgetItems`
in the connection dialogue by setting the font size to the minimum of `1`
and by setting it's colour to be white. This is not effective when the
background is not white - which is likely for a "Dark" desktop environment.
The only way to successfully hide the text is, I think, to not have any!

However the text was being used programmatically, so the best way to use
a `QListWidget` in this mannar is to store the text elsewhere in each
item's structure. Fortunately Qt provides for this with the user data
functionality which allows multiple data items (based on the `QVariant`
class) to be stored within each `QListWidgetItem` using an integer key to
denote the type of the data. Ironically the text, icon and other details
for each item are ALSO stored in this way - however for non-Qt internal
use the lowest integer key that is to be used is `Qt::UserRole` - which
I have assigned to the `(const int) dlgConnectionProfiles::csmNameRole`
static value. It is quite possible that a redesign of the Connect Profiles
dialogue may use this system to store/cache more details about each profile
in the future!

The only issue with this is the lack of a:
`QListWidget::findData(const QVarient&data, int role = Qt::UserRole ...)`
method (c.f. `QComboBox::findData(...)`) so I have had to provide a:
`(QList<QListWidgetItem*>) findData(const QListWidget&, const QVariant&,
                                      const int role = Qt::UserRole) const;
method to fill in this gap and to replace the previous
`QListWidget::find(...)` that examined each item's text.

Also removed local `(QString) profile` from:
`(void) dlgConnectionProfiles::slot_item_clicked(QListWidgetItem*)` as it
is merely a redundent duplicate of another local `(QString) profile_name`.

Renamed local `(QListWidgetItem*) pM` from:
`(void) dlgConnectionProfiles::fillout_form()` to:
`(QListWidgetItem*) pItem` as that reflects the name used throughout the
rest of the class for this type of variable.

Changed a `(QLabel*)::setText(tr(""))` call to the more explicit and less
stupid `(QLabel*)::clear()`. Similarly changed a
`(QWidget*)::setToolTip("")` to a `(QWidget*)::setToolTip(QString())`.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* New Crowdin updates (#3921)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* (autocommit) Updated text for translation (#3949)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update src/dlgConnectionProfiles.cpp

Remove unneeded command as per peer-review suggestion.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: src/dlgConnectionProfiles.h

CodeFactor says that the `static` keyword should come first (before the `const` one).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* (autocommit) Updated autocompletion data (#3954)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated edbee-lib submodule to latest in our fork (#3953)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update: add a couple of new dictionaries to the set that Mudlet recognises

This is so that a text is displayed instead of a fall-back of the locale
code.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* BugFix: announce end of replays when run from replay button

I got the logic reversed in the original #1519 for
`(bool) cTelnet::mmIsReplayRunFromLua` so the ending message was not being
displayed when it should have been.

This will close #2793.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Add dummy functions for TTS if Mudlet was compiled with TTS disabled (#3958)

* Update Linux builds to Qt 5.12.9 (#3959)

* Update Linux builds to Qt 5.12.9

* Update .travis.yml

* Bugfix for string.split with too many characters (#3963)

* Allow string.split("my string", "") with strings > 32 characters
Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* (autocommit) Updated text for translation (#3968)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Update discordapp.com to discord.com (#3979)

* Capitalise 'errors' button text (#3987)

* Avoid new ptb if no new commit (#3990)

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* Update build-mudlet.yml (#3991)

* Add cfeedTriggers, dfeedTriggers, and hfeedTriggers (#3974)

* Add cfeedTriggers, dfeedTriggers, and hfeedTriggers
* add apt update back to linux github build runner
* Giving in because too tired to argue

* Server Data Encoding Selection via Telnet CHARSET (#3972)

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* Add TELOPT_CHARSET (42) Support

* (autocommit) Updated text for translation (#3995)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated autocompletion data (#3996)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Missing files in src/.gitignore (#3997)

* NAWS width handling & reporting (#4002)

* Add Geyser.MiniConsole:display() (#3993)

* Fix typo preventing use of getFg/BgColor on non-main consoles. (#3982)

* (autocommit) Updated autocompletion data (#4006)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Zoom via mouse wheel: keep the position under the cursor in place (#3998)

* Zoom centered on the mouse position

Zooming via the scroll wheel now keeps the position under the curser in
place.

* QT <5.14 compatibility

* Use an exponential factor when zooming

This makes the zoom experience a lot smoother: the step size no longer
depends on how close you're zoomed in.

* Add a separate getHTTP operation and associated events (#4003)

* Add a separate GET operation

Sometimes you just need to read some data from the HTTP server without
going through writing the response to a file.

Also, when a POST redirects to a GET, the reply was lost.

Thus this change introduces a dedicated "getHTTP" function, and a
"sysGetHttpDone" event that contains the actual data.

* Two error messages had the wrong function name

* Bugfix: GET error should receive the URL

Also adds the URL to the download error, as an additional argument

* Grammar and style fix

per comment from SlySven

* bugfix: generic_mapper map config errors (#3971)

* bugfix: Correct help variable for map config

This makes calling `map config` without a specifier work as intended in the trigger.

* Restore map.help.configs to singular

Revert 7b8d532

* bugfix: Point map config alias to correct help

making the #3970 fix in the script broke `map help config`. because the `show_help` function parses the user supplied argument, the script's so-called "help file" needs to have the same singular title as the requested argument. thus, this commit points `map config` to `map.help.config` when the alias is called without argument and also retains the intended `map help config` feature.

* ci: enable sudo apt update

* ci: Re-disable apt update

* Special macOS icons (#3829)

* New macOS .icns icon files

* wire in new macOS icons

Co-authored-by: Kebap <kebap_spam@gmx.net>

* Return table of useful things in HTTP response (#3727)

* Return table of headers in HTTP responses

* Apply code review suggestions

* Make sure to free data stored in lua registry by events

* Try including optional here

* Include optional in both h and cpp files

* Work around OS X limitation https://stackoverflow.com/a/44244070/2197402

* Remove what I now think to be a superfluous include

* Make headerList a const a different way

* Follow the Mudlet convention for how to convert this to const char *

* Put the headers table in a table

* Put the cookies table in a table

* Include QNetworkCookieJar so compiler knows more about the type

* Include QNetworkCookie so compiler knows more about the type

* New Crowdin updates (#3950)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (German)

* (autocommit) Updated autocompletion data (#4011)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Update widechar_width.h to latest upstream (#4010)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Revise: reorder tabs and tab stops in profile preferences (#3929)

Switch some uses of QGridLayout <==> QVBoxLayout depending on whether there
is more or only one column of items.

Moved the "Special options" tab to the last position.

Switch some single columns of items to become two columns so that the
overall vertical size needed for the dialogue can be reduced.

Moved the Discord and IRC options to a new tab "Chat".

These last two are important as they allow the overall dialogue to be
smaller and thus may enable us to close: #3467, #3304.

Removed unused groupBox that has something about deleting map backups. It
is not handled or mentioned in the current code at all and just sits there
as a disabled widget in the mapper tab.

Revise: try to make the preferences dialogue narrower

Set the initial size to be the smallest I can get in use on my Linux
Desktop - others' mileage may vary!

Revise: tweak some texts in accordance with peer-review suggestions

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Support for parsing MXP closing prefixed closing tags used in Materia Magica (#4016)

- Workaround for parsing tags in the format `<scripted_action>x<x/scripted_action>`

* Fixes issue on miniconsoles using link store from the main console (#4017)

* Refactor to create and expose decho2ansi and hecho2ansi functionality (#4019)

* Revise: try and identify profiles and some controls in connection dialog (#3966)

Also convert all `setDisabled(state)` to `setEnabled(!state)` in the
`dlgConnectionProfiles` class - using a single one instead of a mix of the
two is less likely to lead to errors - and it means less effort to search
for the places where something is being enabled or disabled.

Shorten some overlong variable names.

Remove some capitalisations.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* BugFix: restore L. yellow colour button + insert new control in tab order

Due to a numbering error the button used to set the ANSI colour for Light
Yellow for the profile's console was positioned to be on top of the Light
Green one. This was introduced by my #3929 a few days ago!

Also insert a recently added checkbox (force Telnet CHARSET negotiation
off) did not have a tab order specified so navigating around the
preferences dialog with the tab key would not visit it in the right
sequence.

For consistency the order of the main console font size and anti-aliasing
checkbox needed to be swapped over.

To allow both PRs #3952 and #3832 to merge in where they both add in a new
(different) control into the `gridLayout_groupBox_debug` layout in the
"Special options" tab of the profile preferences dialogue a gap has
been left in row 3 of that layout which will be used by the latter of those
two PRs (the other one will add a new row to the end).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* (autocommit) Updated autocompletion data (#4025)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* (autocommit) Updated text for translation (#4024)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Revise: minor change post PR #3966

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Making the foreground section of the hex pattern a noncapturing group allows for only setting the background via hecho/etc. (#4027)

* MXP to MSP Tags (#4015)

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* MXP to MSP Tags

* test/CMakeLists.txt update

* test/CMakeLists.txt update backout

* test/CMakeLists.txt update

* Fix bresetProfile() #3692 (#4020)

* fixes resetProfile()

units need to be enabled to be compiled
the order was wrong

* timers were not re-compiled

* TimerUnit compileAll will now really compile all timers

TimerUnit compileAll didn't compile all timers but only the ones in the rootnode what means that timers in a folder weren't compiled at all

* fix eventhandler not loading after resetProfile()

* (autocommit) Updated text for translation (#4033)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Found a typo where rb and gb were not made local (#4036)

* Allow text color manipulation by StyleSheet on Geyser.Labels (#4042)

* Allow text color manipulation by StyleSheet on Geyser Labels

* cosmetic suggestion and rawEcho

* Introduce purgeMediaCache() [MCMP & MSP] (#4041)

* Introduce purgeAllMediaFiles()

* Introduce purgeMediaCache()

* Updating lua-function-list

* Removed TMedia:: prefix (SlySven)

* Enhance: enable builds in a full Windows MSYS2 environment (#3889)

* Enhance: enable builds in a full Windows MSYS2 environment (QMake only)

By defining `WITH_MAIN_BUILD_SYSTEM` to the value `NO` this PR makes enough
changes to the qmake project file to enable Mudlet to be compiled in a full
MSYS2 development environment (in the MSYS2 Qt Creator) - this will enable
easier development by Windows users (particularly those who also have some
familiarity with *nix systems) as I have documented at:
"Compiling on Windows 7+ (MSYS2_Alternative)" but it seems that the URL is
causing GitHub to forget about the PR as it seems to push and is recorded
in my local repository but never actually lands there!

It also makes some changes to the setting up of the LUA package paths for
the lua code formatter so that the paths are all entered with Unix style
directory separators but converted to whatever the Lua package handler is
set to use. In a Windows environment it is not unheard of to get both '\'
and '/' being used within the same path as different parts get generated
in stages - and using the backslash one can produce surprising error
messages if the back slash is not properly escaped when displaying those
messages in the main console or elsewhere (they dissappear entirely or
end up escaping following characters producing misleading information).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Update src/mudlet.pro

BugFix: fix a typo in qmake project file.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: reduce almost duplicate comments

Fix an addition to the `package.cpath` which would not have worked as it
did not specify the file extension which is OS dependent.

Also remove LuaJIT remenent, which we dropped support for a long time back.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Apply suggestions from code review

Revise: fix an error in a comment.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: take out some pre-processor stuff as run-time code works without it

I was a bit sceptical at first but it *seems* to work.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Enhance: modifications to get CMake working on Windows

Revise a Mudlet specific CMake macro to not include the word "module" as
that is not appropriate for all usages now.

Fix an obscure CMake build error caused by the use of:
`LIBRARYNAME::LIBRARYNAME` in `target_link_libraries(...)` which is the
form for an interface usage of a library - this causes a failure of the
build with an error message of the form:
`src/CMakeFiles/mudlet.dir/build.make:1954: *** target pattern contains
no '%'.  Stop.` that line is actually one about one of the libraries
concerned - and it is the first one which shows up in that file with a
LIBRARYNAME-NOTFOUND entry. The fix seems to be to use only a LIBRARYNAME
form.

Fix a problem in `(static QString) mudlet::getShortPathName(const QString&
name)` which is cause by a Windows specific function that takes.returns
template/typedef type arguments which only work if the symbols
`UNICODE` and `_UNICODE` to be defined and which aren't in an MSYS2/
Mingw-w64 environment.

Revise some usages of the APP_BUILD defined value so that they are
handled correctly (using `QStringLiteral`/`QByteArray` wrapppers).

Change the CMake find module for Pugixml so that it uses a variable name in
ALL_UPPER_CASE to remove a developer warning about using a mixed case one.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Edit: fix copy paste issue

I thought something needed to be more conditional than it was but didn't
get it undone in last commit.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Refactor: simplify the code to set up the Lua/C additional paths for LCF

Peer-review suggested I needed to shrink the code.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: shrink some comments

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: implement some changes requested by peer-review

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: shorten multi-line comment in initIndenterGlobals()

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: further change suggested in peer-review

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Fix recognition of static libraries in own Find modules

Co-authored-by: keneanung <keneanung@googlemail.com>

* BugFix: repair failure to load Lua modules from profile directory (#4051)

This was introduced by PR #3889 which was using a function defined in the
LuaGlobal.lua file before it was loaded! The function definition has been
moved to be within the TLuaInterpreter class C++ code and, as it is now
present in two places, refactored out to a helper method so it can be
loaded into both the main and the lua code formatter Lua interpreters.

This should close #4047.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* (autocommit) Updated text for translation (#4049)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Fixed offset and scrollbars nestedLabels (#4043)

offset was calculated wrong for some combinations and the scrollbars didn't work and had a variable leaking to global

* (autocommit) Updated autocompletion data (#4059)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Math in Geyser constraints (#4056)

* get rid of loadstring and more resizing possibilities

* Update GeyserGeyser.lua

* now really working

* function values update on window resize

There was an issue that function values didn't update on window resize but only when the elemen was resized moved.
This is fixed now.

* Fix Geyser HBox/VBox in development (#4057)

* BugFix: TTYPE error

I introduced this error in #3889 and it was reported in, and this PR
will close #4066.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Ignore Qt Creator autosave files (#4068)

* Add custom Input/Command lines (#4055)

* createCommandLine + Geyser.CommandLine

* subcommandline event / Geyser.CommandLine:setAction

* setWindow crash

setWindow was crashing due to wrong assignment

* add ConsoleCmdLine to MiniConsoles

trying to please codefactor.
Geyser doc had a copy/paste fail.
added a workaround for cursor not visible in some situations like if writing to much text in the commandline

Added ConsoleCmdLine to miniconsoles + geyser

* get rid of the event and introduce set/resetCmdLineAction

* code factor

* fix commandline dissapearing on resize

* fix issue with focus and resize of MiniConsoles when using custom command lines (#4073)

* fix focus and resize of MiniConsole command lines

* get it to work also for UserWindows

* Update generic_mapper.xml (#4075)

* Update the port on StickMUD to use TLS (#4072)

* Geyser.Label rightClick menu (#4054)

* Geyser.Label rightClick menu

gives labels the possibility to have a right click menu

* added rightclickmenu to adjustable.container

* darkmode for adjustable.container

* writing docs and got rid of configmenuLabel

* set StyleSheet for UserWindows (border and title area) (#4046)

* setUserWindowStyle (primitive and Geyser)

* fix autoDock

* Revert "fix autoDock"

This reverts commit c0b1b7a3159818fb307e6a09b3e2b928a650dfb1.

* fix autodock (#4048)

* Allow Geyser containers to have height/width 0 (#4078)

* calculated_width 1 if 0

* same for vbox

* calculated size dynamic

* make code cleaner

* allow adjustable container to load in userwindow (#4037)

* Allow attached Adjustable.Containers to behave like a frame  (#4032)

* MainWindow border margin for attached Adjustable.Containers

* add attachedMargin to the docs

* connectToBorder() disconnect() addConnectMenu()

Allows you to connect your attached adjustable.container to a border which means that it behaves like the border is a frame.
Makes very similar GUI to GUIFrame possible.

* better ConnectMenu + localization

use of new right click menu to make the connectMenu better looking and userfriendlier

* Remove mapper click workaround (#4076)

* Allow different save/load directories and slots for Adjustable.Container settings  (#4053)

* add slot and dir to save/load settings of Adjustable.Containers

* save slot in one file + deleteSaveFile + defaultDirectory

* conflict solved changeContainer also working with slots

* check if attached before trying to detach

* BugFix: prevent Segmentation Faults when closing profile with toolbars

I was getting this error when closing one profile with a tool-bar when
multi-playing. Not sure of the exact cause (other than the toolbar did NOT
have a particular {meta}property - but was trying to convert the
non-existent `QVariant` that would represent it to a Boolean value) but
this should prevent a fatal application crash should it occur again...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Fix PTB build generation (#4081)

* Move commit date logic to earler

* Use commit date instead of author date

* Add background image to mini/main console (#4064)

* first success

* add background image to miniconsole transparency for cecho,decho,hecho

Added ability to add background image to miniconsole.
cecho, hecho, decho support transparency now

* add image also to main console

+ use mpBackground for backgroundcolors
to increase performance

* Update TLuaInterpreter.cpp

* give splitter palette to solve issue with darktheme

darktheme was able to change the background if the splitter had no color set.
this is fixed now

* still darktheme issue

* elements were hidden behind the background (fixed)

* resetBgImage BgImageModes and code suggestions

* change order for :lower as it caused strange issues

* Geyser MiniConsole set/resetBackgroundImage update

* (autocommit) Updated autocompletion data (#4034)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Fix links clickable on the whole console width (#4083)

* prevent links to use full console width

prevent links to use full console width by checking if the mouse is out off the right bound

* make isOutOffBound non-optional

* change isOutOffBound to isOutOffbounds

* typo

* Add horizontal scrollbar to error-console (#4063)

* add scrollbar to errorconsole

* add horizontal scrollbar to error console

* hide if not needed

* update horizontal scrollbar on redrawing

* selection works even if scrolled to the right

* added suggestions and selecting is visible now

* add suggested code changes

* Update TTextEdit.cpp

* these are obsolte due to the background-image pr

these are not needed anymore and could cause a performance issue

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* (autocommit) Updated autocompletion data (#4084)

Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>

* Setup Mudlet for C++ Github Codespaces (#4087)

* Valgrind complained about an uninitialized field. (#4090)

* Improve generic mapper triggers (#4086)

* New Crowdin updates (#4009)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (French)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Spanish)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Greek)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (Dutch)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Portuguese)

* New translations mudlet.ts (Turkish)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Portuguese, Brazilian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Pirate English)

* New translations mudlet.ts (Russian)

* New translations mudlet.ts (French)

* New translations mudlet.ts (Chinese Simplified)

* New translations mudlet.ts (Polish)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (German)

* New translations mudlet.ts (German)

* New translations mudlet.ts (Italian)

* New translations mudlet.ts (English, United Kingdom)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet.ts (Chinese Traditional)

* New translations mudlet-lua.json (French)

* New translations mudlet-lua.json (Russian)

* New translations mudlet-lua.json (Chinese Traditional)

* New translations mudlet-lua.json (Chinese Simplified)

* New translations mudlet-lua.json (Turkish)

* New translations mudlet-lua.json (Spanish)

* New translations mudlet-lua.json (Polish)

* New translations mudlet-lua.json (Dutch)

* New translations mudlet-lua.json (Italian)

* New translations mudlet-lua.json (German)

* New translations mudlet-lua.json (Italian)

* New translations mudlet-lua.json (German)

* New translations mudlet.ts (German)

* New translations mudlet-lua.json (English, United Kingdom)

* New translations mudlet-lua.json (Russian)

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* Open Mudlet remotely using Github Codespaces (#4088)

* Improve codespaces setup

* Added libqt5opengl5-dev

* Forward vnc port 5900 by default

* Install Lua dependencies

* Add script to run Debian UI

* Fix schellcheck warning

* Update Dockerfile with desktop Debian instructions

* Updated devcontainer.json with desktop Debian

* Fix Dockerfile linter

* Fix spelling in the Dockerfile (#4094)

* ansi2string to strip ANSI colours (#4092)

* Install CMake tools as well for Github Codespace (#4096)

* Update Codespaces remote connect password (#4097)

* BugFix: handle floating toolbars with no DockArea set

I discovered I had a problem with this when working on something else with
an existing profile. The result was that the toolbar concerned was not
added to the main window. This PR forces a resolution to this by reapplying
the toolbar to the default left DockWidgetArea if no previous one seemed to
be set.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Bugfix: handling of Big5 encodings for ambiguous E Asian auto-widening (#4030)

When the preference that controlled the E. Asian widening was set to "Auto"
it was not being correctly detected as the wrong `QByteArray` strings were
being checked against the currently selected Game Server encoding setting.
This would mean that both the variants that Mudlet offered would be using
the "Normal"/"Narrow" wide for such ambiguous graphemes rather than the
"Wide" that was intended.

Also, there were some places in the `TLuaInterpreter` class where the
encoding details were being treated as `QString`s rather than the
`QByteArray` that is used specifically to match up with Qt's own usage,
and avoid the whole `QStringLiteral(...)`/`QObject::tr(...)` wrapper issue
that arises from the use of `QString`...

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* fix ctrl crash (#4098)

* Add a global event listener: `*` and Lua interpreter cleanup (#4091)

* pGlobalLua cannot be NULL

* Don't clear the stack

Internal functions should leave the stack as they found it.
Clearing it is not intuitive and in fact causes crashes.

* Clean up MSSP event generation

That loop is obfuscating the code.

* Add a "*" wildcard event subscription.

* Teach the Lua event dispatcher about "*"

This requires registering the Lua dispatcher to "*" instead of every
single event type. Otherwise as soon as somebody wants all events
every dispatcher would be called twice.

* Use a constant string

* Use upper pane height for page scroll (#4099)

* use upperPane for page scrolling

* screenheight was private

* removeAction was missing when parent was deleted (#4101)

Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>

* Fix right-click menu and image copy (#4102)

* restore old behaviour

restore old behaviour for right click menu and for the
image copy

* add bg color to image copy

bg color was always black in image copy.
Now it's completly the old behaviour

* Fix release version numbers in windows installers

* Fix typo in mapper's area box warning (#4106)

* Fix macOS packaging (#4103)

* Try brew update-reset instead of update

* Use brew-update-reset branch

* Back to brew update

* Revert "Back to brew update"

This reverts commit 84e00b69675bf1f635c50de1776a6a710c51e156.

* Update travis.osx.after_success.sh

* Update travis.osx.before_install.sh

* Update travis.osx.before_install.sh

* One last time, try brew update-reset

* Fix typo (#4110)

* ok

* Revise: add build details in development QApplication::ApplicationVersion (#35)

Also add indication of bitness in QApplication::ApplicationName for Windows
builds.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

Co-authored-by: Stephen Lyons <slysven@virginmedia.com>

Co-authored-by: mudlet-machine-account <39947211+mudlet-machine-account@users.noreply.github.com>
Co-authored-by: Manuel Wegmann <60551052+Edru2@users.noreply.github.com>
Co-authored-by: Kebap <leckerkebap@gmx.li>
Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
Co-authored-by: Stephen Lyons <slysven@virginmedia.com>
Co-authored-by: Gustavo Sousa <gustavocms@gmail.com>
Co-authored-by: Eraene <wisps.of.time@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mudlet-machine-account <mudlet-machine-account@users.noreply.github.com>
Co-authored-by: Damian Monogue <3660+demonnic@users.noreply.github.com>
Co-authored-by: Ian Adkins <ieadkins@gmail.com>
Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Mike Conley <sousesider@gmail.com>
Co-authored-by: Fae <itsthefae@gmail.com>
Co-authored-by: Jonathan Mohrbacher <johnnymo87@gmail.com>
Co-authored-by: keneanung <keneanung@googlemail.com>
Co-authored-by: Matthias Urlichs <matthias@urlichs.de>
Co-authored-by: Stack <stack@ilpdev.com>
Co-authored-by: Kebap <kebap_spam@gmx.net>
Chris7 pushed a commit to Chris7/Mudlet that referenced this pull request Jan 2, 2022
* Enhance: enable builds in a full Windows MSYS2 environment (QMake only)

By defining `WITH_MAIN_BUILD_SYSTEM` to the value `NO` this PR makes enough
changes to the qmake project file to enable Mudlet to be compiled in a full
MSYS2 development environment (in the MSYS2 Qt Creator) - this will enable
easier development by Windows users (particularly those who also have some
familiarity with *nix systems) as I have documented at:
"Compiling on Windows 7+ (MSYS2_Alternative)" but it seems that the URL is
causing GitHub to forget about the PR as it seems to push and is recorded
in my local repository but never actually lands there!

It also makes some changes to the setting up of the LUA package paths for
the lua code formatter so that the paths are all entered with Unix style
directory separators but converted to whatever the Lua package handler is
set to use. In a Windows environment it is not unheard of to get both '\'
and '/' being used within the same path as different parts get generated
in stages - and using the backslash one can produce surprising error
messages if the back slash is not properly escaped when displaying those
messages in the main console or elsewhere (they dissappear entirely or
end up escaping following characters producing misleading information).

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Update src/mudlet.pro

BugFix: fix a typo in qmake project file.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: reduce almost duplicate comments

Fix an addition to the `package.cpath` which would not have worked as it
did not specify the file extension which is OS dependent.

Also remove LuaJIT remenent, which we dropped support for a long time back.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Apply suggestions from code review

Revise: fix an error in a comment.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: take out some pre-processor stuff as run-time code works without it

I was a bit sceptical at first but it *seems* to work.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Enhance: modifications to get CMake working on Windows

Revise a Mudlet specific CMake macro to not include the word "module" as
that is not appropriate for all usages now.

Fix an obscure CMake build error caused by the use of:
`LIBRARYNAME::LIBRARYNAME` in `target_link_libraries(...)` which is the
form for an interface usage of a library - this causes a failure of the
build with an error message of the form:
`src/CMakeFiles/mudlet.dir/build.make:1954: *** target pattern contains
no '%'.  Stop.` that line is actually one about one of the libraries
concerned - and it is the first one which shows up in that file with a
LIBRARYNAME-NOTFOUND entry. The fix seems to be to use only a LIBRARYNAME
form.

Fix a problem in `(static QString) mudlet::getShortPathName(const QString&
name)` which is cause by a Windows specific function that takes.returns
template/typedef type arguments which only work if the symbols
`UNICODE` and `_UNICODE` to be defined and which aren't in an MSYS2/
Mingw-w64 environment.

Revise some usages of the APP_BUILD defined value so that they are
handled correctly (using `QStringLiteral`/`QByteArray` wrapppers).

Change the CMake find module for Pugixml so that it uses a variable name in
ALL_UPPER_CASE to remove a developer warning about using a mixed case one.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Edit: fix copy paste issue

I thought something needed to be more conditional than it was but didn't
get it undone in last commit.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Refactor: simplify the code to set up the Lua/C additional paths for LCF

Peer-review suggested I needed to shrink the code.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: shrink some comments

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: implement some changes requested by peer-review

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: shorten multi-line comment in initIndenterGlobals()

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Revise: further change suggested in peer-review

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>

* Fix recognition of static libraries in own Find modules

Co-authored-by: keneanung <keneanung@googlemail.com>
Chris7 pushed a commit to Chris7/Mudlet that referenced this pull request Jan 2, 2022
…dlet#4051)

This was introduced by PR Mudlet#3889 which was using a function defined in the
LuaGlobal.lua file before it was loaded! The function definition has been
moved to be within the TLuaInterpreter class C++ code and, as it is now
present in two places, refactored out to a helper method so it can be
loaded into both the main and the lua code formatter Lua interpreters.

This should close Mudlet#4047.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Chris7 pushed a commit to Chris7/Mudlet that referenced this pull request Jan 2, 2022
I introduced this error in Mudlet#3889 and it was reported in, and this PR
will close Mudlet#4066.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants