Skip to content

Commit 34cf653

Browse files
jgh713vadi2
authored andcommitted
Text to speech (#1893)
* Removed duplicate clear event handlers call * Revert back to dev version. 3.3 here we go! * Adds saveWindowLayout() call to AutoSaveOnExit processing. * Edbee editor implementation (#985) * Added a frame to edbee so it looks nicer * Got utf8 module to load (#1074) (update packaging!) * Modified tooltip for Save and Save Profile to clearly indicate their keyboard shortcuts * Added: shortcut for delete action in editor (#1084) * shortcut added for delete action * Removed redundant edbee config related code (#1091) * Delete TScriptEditorManager.h * Delete TScriptEditorManager.cpp * BugFix: import some fixes by "Zolder" from Mudlet (Realms of Legends) fork import: some Zoilder fixes from the MudletRL fork: * in TBuffer::translateToPlainText(...): make some MXP related code execute only if Host::mFORCE_MXP_NEGOTIATION_OFF is NOT set as well as another condition. * in TBuffer::wrap(...): change a for(...) {...} loop termination condition be a "<" rather than a "<=" test - which sounds like an "off-by-one" error fix-up. * In TTextEdit:updateScreenView(): revise code that seems to prevent the width of a "main" console being set too small and NOT written to the "parent" Host::mScreenWidth variable - the original modification removed such a restriction completely, but I have just lowered the minimum from 100 to 40 and ensured it is always stored both in the local "main" console and to the parent record in the Host class for that console. * In TTextEdit::drawForeground(...): revise the behaviour *I think* when at the point where a console "split" becomes unnecessary... Signed-off-by: Stephen Lyons <slysven@virginmedia.com> * Cut down on the length of some variable names (#1086) * Clarified use of QLatin1String * Adding GCC 5 for C++14 requirement (#1098) * Fixed "reset map colors" button to work (#1049) * Fixed "reset map colors" button to work That's a 5 year old bug out of the way! * Change travis configuration to use installed gcc-5 (#1108) * Change travis configuration to use installed gcc-5 * Fixes #1104 (#1109) Thanks to Rick for his prompt response on this * Fixed typo in GeyserLabel.lua Per #1112 * Fix locale to C Enforce uniform locale so scripts don't get tripped up on number representation differences (. vs ,) * IRC client update of UI and logic (#1072) * Add Communi Model & Util libs * Full refactor of IRC Client code & UI This retains the primary functions of the old IRC client but adds many more new IRC commands by default. The UI is slightly more organized and interactive now. * Adds QPointer to IRC Dialog pointer variable. * Update Lua `sendIrc()` slightly. * Added /msg command, Input History, and updated display colors. Input History stores a total of 8 previously entered commands the user can cycle through using the Up Arrow key. The previously include /msg command has been added again. Colors of some messages have been updated for (relatively) easier distinction of message lines. * Updated channel handling. * Fix CMake builds Things needed to fix CMake builds: - communi CMake builds needed `include_directories` explicitly specified - more MOC calls in communi - more explicit dependencies to MOC files in communi - ircmessageformatter must be compiled into mudlet * IRC3 with more Lua features (#1087) Changes IRC client to run with settings given per-profile, making the IRC client more visible and configurable within Lua. This adds configuration options to the settings window in the "Special Options" tab for configuring an IRC client on the host profile which opens the settings window. See the PR summary comment for details on available Lua functions and IRC Client commands. * Add a Code of Conduct (#1110) * Create CODE_OF_CONDUCT.md * Fix for the QMake warnings caused by the IRC library includes. * Finished formatting all filed & added braces (#1115) * Finished formatting all filed & added braces * Re-enabled map load on profile load (#1118) * Re-enabled map load on profile load - disabling it broke scripts that relied on map data w/o the map open * updated assignments. * Event-based gamepad functionality (#1106) * Add theme switching to code editor (#1095) * Fix more Toolbar & Button bugs (#1080) (#1090) * Fix bugs with Buttons & Toolbars. - Fixed change detection for location, orienation, and CSS data. - Buttons are not rendered unless they are part of a group, Toolbar/Menu. - ToolBars whos locations are changed now hide their previous TToolBar or TEasyButtonBar instance as needed. * Fix Buttons being left behind when parent toolbar is deleted. Also allows TAction to use QPointer<T> * Update old sourceforge page links (#1132) (#1134) * Fixed blank command separator to not separate as people expect * Replaced isTempKey, isTempAlias, etc with isTemporary (#1102) * also pushed isFolder() and setIsFolder() to the parent Tree class * Give meaning to encodings (#1107) * Delete dev_README Deleted outdated dev_README file. It also didn't seem to be used all that often, else people would have raised the fact that it's outdated... * Update travis to use Qt 5.9 for compiling (#1141) * Re-add single QT 5.6 build job Since we want to keep sure that the minimal Qt version is still compilable (currently we need at least 5.6), we add a single job for that version. * Refactor: rename QMake project/sub-project files (#1103) * refactor: rename QMake project/sub-project files It is down right confusing having several project files in the Qt IDE which are all labelled "src" - this commit renames the main project file from "src.pro" to "mudlet.pro" and also renames: * the lua_yajl module from src.pri to lua_yajl.pri * the luazip module from src.pri to luazip.pri it also: * adds a new communi.pri file (see below) I also took the liberty of renaming the project resource file from: * mudlet_alpha.qrc to mudlet.qrc (we are well past the alpha stage now!) and sorting a couple of items into the right order. By creating a local project file 3rdparty/communi/communi.pri it is possible to group the three separate but related communi libraries into one - as it happens the effective content of the new file is identical to that of the communi libraries own libcommuni/src/src.pri but it has some notes on how the portion of the upstream library that we are using was picked out of there; how to identify the effect version and how to (hopefully) recreate things if upstream gets revised in the future! By not using the upstream "src.pri"/"src.pro" files we avoid the confusion of having a generic "src" project in the Mudlet project as a whole and it is clearly identify-able as a file from the Mudlet project rather than the sub-project that it pulls into the whole thing... There is an minor nuisance side-effect in that having the main project src.pro file open in a Qt Creator IDE or stored in a session will get confused when this commit takes effect as the file will disappear from the repository - it will be necessary to close the project and open the new src/mudlet.pro project file (and possibly re-enter the build steps) - OTOH the main project will now be identified as "mudlet" in Creator rather than the previous "src". 😄 Signed-off-by: Stephen Lyons <slysven@virginmedia.com> * Removed accidental debug echo left in (#1151) * initialize int nIrcPort with dlgIRC::DefaultHostPort value. (#1153) * Removes false from sendIrc() return, ignores command filtering status (#1154) * Removes false from sendIrc() return, ignores command filtering status (not used). * Remove punctuation from lua messages * Improved layout of IRC preferences (#1152) * Fix get map events (#1120) * Adapt addMapEvent error messages to current standard * Fix getMapEvents() The function now returns a proper indexed table of objects that each describe a map event. * Add missing call to set Editor as editable. (#1159) * Fixed tab indent to be two spaces again * Fixed getComputerEncoding in case no key found It'll now return the original value passed - it's way better than returning the wrong value. * Add linux ci deployment (#1128) * Modify files needed for CI deployment of linux builds * Syntax fix in .travis.yml * tar the CI AppImages as well * Add lua sqlite runtime dependency * Unset LD variable for linuxdeployqt * Bugfix: unset LD_LIBRARY_PATH in every codepath * Test: install appmenu-qt5 for global menus * Revert 781ef97 (Install appmenu-qt5) The issue was that the first AppImage used Qt 5.6.2 instead of Qt 5.9 (which is how 3.2 was built and how it is build now after merging development in) * Remove manager again (#1163) * Improved map load output to be condensed down if it's all successful (#1117) OK! Would be happy to see that in as well for maps that take a while to load (>1s). * Re-enable search highlighting (#1096) * Remove mainwindow statusbar (#1162) * Replaced statustips with tooltips in the mapper menu * Removed statusbar * Tagging 3.3.0 * Initial QTextToSpeech additions * Further TTS additions and bugfixes * Wrapping TTS functions in #ifdefs for QT_TTS_LIB * Missing #ifdefs * More misplaced #ifdef lines for TTS functions * More QT_TTS_LIB ifs * Adding QTextToSpeech to cmake lists * Various TTS updates * Adding GetState to TLuaInterpreter.h * Minor fixes * Tts temporary fixes * Exchanging toLatin1 with toUtf8 * Fix cmake TTS module includesion * Install Qt 5.9 TTS module on linux * Use Qt provided definition for enabled modules We don't need (and possibly don't want) to provide our own definition for when a module is enabled. Let's use the Qt provided definition instead. * Output confirmation messages of enabled Qt modules * Use upper case "Gamepad" in output * ttsClearQueue crash fix * Fix for global speech events * Whitespace replacement * Various minor fixes * More minor fixes. * Cleanup: make CMakeList.txt have uniform indenting and adjust CMake message The minimum versions of the Qt TextToSpeech and Gamepad reported in the CMake project files needed tweaking. I have also tried to regularise the indentation in the Mudlet CMake project files to standardise on 2 spaces. Signed-off-by: Stephen Lyons <slysven@virginmedia.com> * Reformat: clean up code-loyout of new TTS TLuaInterpreter code Signed-off-by: Stephen Lyons <slysven@virginmedia.com> * BugFix: fixup a switch() in (int) TLuaInterpreter::ttsGetState(lua_State*) This switch was missing "break;" on all the cases and must have been defective without them - for all but the last case extra strings would have been pushed onto the lua stack but as the return value was 1 they may have been discarded... Signed-off-by: Stephen Lyons <slysven@virginmedia.com> * Enable Qt 5.9 Windows builds for testing * Deploy Qt 5.9 builds for testing * Fixing double-events for queueing purposes * Added missing symbol * Added missing symbol * Updating tts events to globals and adding voice * Create TTSValues.lua * Adding TTSValues to LuaGlobal * Adding TTSValues to Mudlet project * Update CMakeLists.txt * Update TTSValues.lua * Update Qt to 5.10 for trusty This is needed to hopefully have some TTS backend plugins in Linux * Queueing and crash fixes * Renaming tts funcs * Renaming internal functions * Adding functions for retrieving settings * Fixing typo * Making ttsGetState public * Improve error messages for ttsGetCurrentLine() It can be incredibly frustrating to just get a boolean back as an error message when you don't know what is going on * Update error message to be consistent with the new style * Aligned error messages to be consistent with the new style * Fix ttsClearQueue to return nil+error, not actually error on invalid index * Minor code formatting * Floats to doubles * Update documentation links
1 parent f9792f7 commit 34cf653

File tree

10 files changed

+725
-113
lines changed

10 files changed

+725
-113
lines changed

.travis.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ addons:
77
apt:
88
sources: &add-sources
99
- sourceline: 'ppa:beineri/opt-qt571-trusty'
10-
- sourceline: 'ppa:beineri/opt-qt593-trusty'
10+
- sourceline: 'ppa:beineri/opt-qt-5.10.1-trusty'
1111
- sourceline: 'ppa:ubuntu-toolchain-r/test'
1212
- sourceline: 'ppa:ondrej/php'
1313
packages: &common-packages
@@ -56,49 +56,50 @@ matrix:
5656
compiler: gcc
5757
env:
5858
- Q_OR_C_MAKE=qmake
59-
QT_VERSION=59
59+
QT_VERSION=510
6060
addons:
6161
apt:
6262
sources: *add-sources
63-
packages: &qt59-packages
63+
packages: &qt510-packages
6464
- *common-packages
65-
- qt59base
66-
- qt59multimedia
67-
- qt59tools
68-
- qt59gamepad
65+
- qt510base
66+
- qt510multimedia
67+
- qt510tools
68+
- qt510gamepad
69+
- qt510speech
6970

7071
- os: linux
7172
compiler: gcc
7273
env:
7374
- Q_OR_C_MAKE=cmake
74-
QT_VERSION=59
75+
QT_VERSION=510
7576
addons:
7677
apt:
7778
sources: *add-sources
7879
packages:
79-
- *qt59-packages
80+
- *qt510-packages
8081

8182
- os: linux
8283
compiler: clang
8384
env:
8485
- Q_OR_C_MAKE=qmake
85-
QT_VERSION=59
86+
QT_VERSION=510
8687
addons:
8788
apt:
8889
sources: *add-sources
8990
packages:
90-
- *qt59-packages
91+
- *qt510-packages
9192

9293
- os: linux
9394
compiler: clang
9495
env:
9596
- Q_OR_C_MAKE=cmake
96-
QT_VERSION=59
97+
QT_VERSION=510
9798
addons:
9899
apt:
99100
sources: *add-sources
100101
packages:
101-
- *qt59-packages
102+
- *qt510-packages
102103

103104
- os: linux
104105
compiler: gcc

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ endif()
124124
# something else or not even exist).
125125
set(FONT_TEST $ENV{WITH_FONTS})
126126
if(DEFINED FONT_TEST)
127-
string(TOUPPER ${FONT_TEST} FONT_TEST)
127+
string(TOUPPER ${FONT_TEST} FONT_TEST)
128128
else()
129-
# Set the CMake variable to the default if it (as a result of WITH_FONTS not
130-
# existing) has not been defined, without the if(DEFINED ...) string(...)
131-
# errors out - and so may further tests on the variable...
132-
set(FONT_TEST "YES")
129+
# Set the CMake variable to the default if it (as a result of WITH_FONTS not
130+
# existing) has not been defined, without the if(DEFINED ...) string(...)
131+
# errors out - and so may further tests on the variable...
132+
set(FONT_TEST "YES")
133133
endif()
134134
if(FONT_TEST STREQUAL "NO")
135135
option(USE_FONTS "Include Deja Vu and Ubuntu fonts in the executable" OFF)
@@ -214,10 +214,10 @@ endif()
214214

215215
file(GLOB_RECURSE lua_files RELATIVE "${CMAKE_HOME_DIRECTORY}/src/mudlet-lua/lua/" "${CMAKE_HOME_DIRECTORY}/src/mudlet-lua/lua/*.lua")
216216
list(LENGTH lua_files lua_file_count)
217-
if(lua_file_count EQUAL 25)
217+
if(lua_file_count EQUAL 26)
218218
message(STATUS "Found Mudlet & Geyser lua files")
219219
else()
220-
message(WARNING "Found ${lua_file_count} Mudlet & Geyser lua files but 25 were expected:")
220+
message(WARNING "Found ${lua_file_count} Mudlet & Geyser lua files but 26 were expected:")
221221
foreach(lua_file ${lua_files})
222222
message(STATUS " ${lua_file}")
223223
endforeach(lua_file)

src/CMakeLists.txt

Lines changed: 82 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
set(mudlet_RCCS mudlet.qrc)
2323

2424
if(USE_FONTS)
25-
set(mudlet_fonts_RCCS mudlet_fonts.qrc)
26-
add_definitions(-DINCLUDE_FONTS)
25+
set(mudlet_fonts_RCCS mudlet_fonts.qrc)
26+
add_definitions(-DINCLUDE_FONTS)
2727
endif()
2828

2929
set(mudlet_SRCS
@@ -102,29 +102,28 @@ set(mudlet_SRCS
102102

103103
# This is for compiled UI files, not those used at runtime though the resource file.
104104
set(mudlet_UIS
105-
ui/about_dialog.ui
106-
ui/actions_main_area.ui
107-
ui/aliases_main_area.ui
108-
ui/color_trigger.ui
109-
ui/composer.ui
110-
ui/connection_profiles.ui
111-
ui/dlgPackageExporter.ui
112-
ui/irc.ui
113-
ui/keybindings_main_area.ui
114-
ui/main_window.ui
115-
ui/mapper.ui
116-
ui/notes_editor.ui
117-
ui/profile_preferences.ui
118-
ui/room_exits.ui
119-
ui/scripts_main_area.ui
120-
ui/source_editor_area.ui
121-
ui/system_message_area.ui
122-
ui/timers_main_area.ui
123-
ui/triggers_main_area.ui
124-
ui/trigger_editor.ui
125-
ui/trigger_pattern_edit.ui
126-
ui/vars_main_area.ui
127-
)
105+
ui/about_dialog.ui
106+
ui/actions_main_area.ui
107+
ui/aliases_main_area.ui
108+
ui/color_trigger.ui
109+
ui/composer.ui
110+
ui/connection_profiles.ui
111+
ui/dlgPackageExporter.ui
112+
ui/irc.ui
113+
ui/keybindings_main_area.ui
114+
ui/main_window.ui
115+
ui/mapper.ui
116+
ui/notes_editor.ui
117+
ui/profile_preferences.ui
118+
ui/room_exits.ui
119+
ui/scripts_main_area.ui
120+
ui/source_editor_area.ui
121+
ui/system_message_area.ui
122+
ui/timers_main_area.ui
123+
ui/triggers_main_area.ui
124+
ui/trigger_editor.ui
125+
ui/trigger_pattern_edit.ui
126+
ui/vars_main_area.ui)
128127

129128
set(mudlet_MOC_HDRS
130129
ctelnet.h
@@ -341,10 +340,23 @@ find_package(Qt5 5.7 REQUIRED COMPONENTS Core Multimedia Network OpenGL UiTools
341340
# This is not present before Qt 5.7:
342341
find_package(Qt5 COMPONENTS Gamepad QUIET)
343342

343+
# This is not present before Qt 5.9:
344+
find_package(Qt5 COMPONENTS TextToSpeech QUIET)
345+
344346
if (Qt5Core_VERSION VERSION_LESS 5.7)
345347
message(FATAL_ERROR "Mudlet requires Qt 5.7 or later, yours is ${Qt5Core_VERSION}")
348+
elif(Qt5Core_VERSION VERSION_LESS 5.9)
349+
# Qt Gamepad was a Technology Preview in 5.7
350+
# Qt Gamepad was a Technology Preview 2 in 5.8
351+
# Qt Speech (or at least the TTS part) was a Technology Preview in 5.8
352+
message(WARNING "Qt version: ${Qt5Core_VERSION} - Gamepad and TextToSpeech may not be supported, as officially they requires 5.9 and 5.10 respectively")
353+
elif(Qt5Core_VERSION VERSION_LESS 5.10)
354+
# Qt Speech (or at least the TTS part) was a Technology Preview 2 in 5.9, now supported on Mingw
355+
# Qt Gamepad was officially released in 5.9
356+
message(WARNING "Qt version: ${Qt5Core_VERSION} - TextToSpeech may not be supported, officially it requires 5.10")
346357
else()
347-
message(STATUS "Qt version: ${Qt5Core_VERSION}")
358+
# Qt Speech (or at least the TTS part) was officially release in 5.10
359+
message(STATUS "Qt version: ${Qt5Core_VERSION}")
348360
endif()
349361

350362
message(STATUS "Using ${CMAKE_CXX_COMPILER_ID} compiler")
@@ -397,8 +409,8 @@ find_package(Boost 1.44 COMPONENTS graph)
397409
add_definitions(-DAPP_VERSION="${APP_VERSION}" -DAPP_BUILD="${APP_BUILD}" -DAPP_TARGET="${APP_TARGET}")
398410

399411
if(UNIX)
400-
set(LUA_DEFAULT_DIR "${CMAKE_INSTALL_PREFIX}/share/mudlet/lua")
401-
set(LCF_DIR "${CMAKE_INSTALL_PREFIX}/share/mudlet/lua/lcf")
412+
set(LUA_DEFAULT_DIR "${CMAKE_INSTALL_PREFIX}/share/mudlet/lua")
413+
set(LCF_DIR "${CMAKE_INSTALL_PREFIX}/share/mudlet/lua/lcf")
402414
endif(UNIX)
403415

404416
# Define a preprocessor symbol with the default fallback location from which
@@ -427,49 +439,53 @@ include_directories(
427439
${PUGIXML_INCLUDE_DIR}
428440
)
429441

442+
if(Qt5TextToSpeech_FOUND)
443+
add_definitions(${Qt5TextToSpeech_DEFINITIONS})
444+
include_directories(${Qt5TextToSpeech_INCLUDE_DIRS})
445+
message(STATUS "Using TextToSpeech module")
446+
endif(Qt5TextToSpeech_FOUND)
447+
430448
if(Qt5Gamepad_FOUND)
431-
add_definitions(${Qt5Gamepad_DEFINITIONS})
432-
include_directories(${Qt5Gamepad_INCLUDE_DIRS})
433-
message(STATUS "Using Gamepad module")
449+
add_definitions(${Qt5Gamepad_DEFINITIONS})
450+
include_directories(${Qt5Gamepad_INCLUDE_DIRS})
451+
message(STATUS "Using Gamepad module")
434452
endif(Qt5Gamepad_FOUND)
435453

436454
# Need to use the plural variables as there can be more than ONE directory to specify:
437455
if(PC_ZIP_FOUND)
438-
include_directories( ${PC_ZIP_INCLUDE_DIRS} )
456+
include_directories( ${PC_ZIP_INCLUDE_DIRS} )
439457
else()
440-
include_directories( ${ZIP_INCLUDE_DIRS} )
458+
include_directories( ${ZIP_INCLUDE_DIRS} )
441459
endif()
442460

443461
include_directories( ${ZLIB_INCLUDE_DIR} )
444462

445463
QT5_WRAP_UI(mudlet_UIS_H ${mudlet_UIS})
446464
QT5_WRAP_CPP(mudlet_MOC_SRCS ${mudlet_MOC_HDRS})
447465
if(USE_FONTS)
448-
QT5_ADD_RESOURCES(mudlet_RCC_SRCS ${mudlet_RCCS} ${mudlet_fonts_RCCS})
466+
QT5_ADD_RESOURCES(mudlet_RCC_SRCS ${mudlet_RCCS} ${mudlet_fonts_RCCS})
449467
else()
450-
QT5_ADD_RESOURCES(mudlet_RCC_SRCS ${mudlet_RCCS})
468+
QT5_ADD_RESOURCES(mudlet_RCC_SRCS ${mudlet_RCCS})
451469
endif()
452470

453471
if(WIN32)
454-
add_executable(mudlet WIN32
455-
${mudlet_SRCS}
456-
${mudlet_MOC_SRCS}
457-
${mudlet_RCC_SRCS}
458-
${mudlet_HDRS}
459-
${mudlet_UIS_H}
460-
${mudlet_MOC_HDRS}
461-
${mudlet_LUA_FILES}
462-
)
472+
add_executable(mudlet WIN32
473+
${mudlet_SRCS}
474+
${mudlet_MOC_SRCS}
475+
${mudlet_RCC_SRCS}
476+
${mudlet_HDRS}
477+
${mudlet_UIS_H}
478+
${mudlet_MOC_HDRS}
479+
${mudlet_LUA_FILES})
463480
else()
464-
add_executable(mudlet
465-
${mudlet_SRCS}
466-
${mudlet_MOC_SRCS}
467-
${mudlet_RCC_SRCS}
468-
${mudlet_HDRS}
469-
${mudlet_UIS_H}
470-
${mudlet_MOC_HDRS}
471-
${mudlet_LUA_FILES}
472-
)
481+
add_executable(mudlet
482+
${mudlet_SRCS}
483+
${mudlet_MOC_SRCS}
484+
${mudlet_RCC_SRCS}
485+
${mudlet_HDRS}
486+
${mudlet_UIS_H}
487+
${mudlet_MOC_HDRS}
488+
${mudlet_LUA_FILES})
473489
endif()
474490

475491
target_link_libraries(mudlet
@@ -491,19 +507,22 @@ target_link_libraries(mudlet
491507
edbee-lib
492508
)
493509

510+
if(Qt5TextToSpeech_FOUND)
511+
target_link_libraries(mudlet ${Qt5TextToSpeech_LIBRARIES})
512+
endif(Qt5TextToSpeech_FOUND)
513+
494514
if(USE_UPDATER)
495-
target_link_libraries(mudlet
496-
dblsqd)
515+
target_link_libraries(mudlet dblsqd)
497516
endif(USE_UPDATER)
498517

499518
if(Qt5Gamepad_FOUND)
500-
target_link_libraries(mudlet ${Qt5Gamepad_LIBRARIES})
519+
target_link_libraries(mudlet ${Qt5Gamepad_LIBRARIES})
501520
endif(Qt5Gamepad_FOUND)
502521

503522
if(PC_ZIP_FOUND)
504-
target_link_libraries(mudlet ${PC_ZIP_LIBRARIES})
523+
target_link_libraries(mudlet ${PC_ZIP_LIBRARIES})
505524
else()
506-
target_link_libraries(mudlet ${ZIP_LIBRARIES})
525+
target_link_libraries(mudlet ${ZIP_LIBRARIES})
507526
endif()
508527

509528
if(WIN32)
@@ -512,16 +531,14 @@ if(WIN32)
512531
endif()
513532

514533
if(APPLE)
515-
target_link_libraries(mudlet
516-
luazip
517-
)
534+
target_link_libraries(mudlet luazip)
518535

519536
if(USE_UPDATER)
520537
target_link_libraries(mudlet
521-
cocoa-qt-glue
522-
"-framework Sparkle"
523-
"-framework AppKit"
524-
"-F${CMAKE_HOME_DIRECTORY}/3rdparty/cocoapods/Pods/Sparkle")
538+
cocoa-qt-glue
539+
"-framework Sparkle"
540+
"-framework AppKit"
541+
"-F${CMAKE_HOME_DIRECTORY}/3rdparty/cocoapods/Pods/Sparkle")
525542
endif(USE_UPDATER)
526543
endif()
527544

src/HostManager.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,11 @@ void HostManager::postIrcMessage(QString a, QString b, QString c)
128128
// send out the events to the other hosts in a predictable and consistent order
129129
// and so that no one host gets an unfair advantage when emitting events. The
130130
// sending profile host does NOT get the event!
131-
void HostManager::postInterHostEvent(const Host* pHost, const TEvent& event)
131+
// Note: Optional forceGlobal allows passing a null pointer as pHost, and will raise
132+
// an event for all profiles.
133+
void HostManager::postInterHostEvent(const Host* pHost, const TEvent& event, const bool forceGlobal)
132134
{
133-
if (!pHost) {
135+
if (!pHost && !forceGlobal) {
134136
return;
135137
}
136138

src/HostManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class HostManager
4848
bool addHost(QString name, QString port, QString login, QString pass);
4949
bool deleteHost(QString);
5050
void postIrcMessage(QString, QString, QString);
51-
void postInterHostEvent(const Host*, const TEvent&);
51+
void postInterHostEvent(const Host*, const TEvent&, const bool = false);
5252

5353
private:
5454
QReadWriteLock mPoolReadWriteLock; // Was QMutex, but we needed to allow concurrent read access

0 commit comments

Comments
 (0)