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

WIP: Bisecting Windows crash #6661

Closed
wants to merge 9 commits into from
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,6 @@ set(CMAKE_UNITY_BUILD_BATCH_SIZE 40)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ${lto})
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF)

if(client OR server)
add_subdirectory(src)
endif()

if(g15 AND WIN32)
add_subdirectory("helpers/g15helper")
endif()
Expand Down Expand Up @@ -197,6 +193,10 @@ if(plugins AND client)
add_subdirectory(plugins)
endif()

if(client OR server)
add_subdirectory(src)
endif()

add_subdirectory(auxiliary_files)

if(packaging)
Expand Down
3 changes: 3 additions & 0 deletions cmake/compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ if(MSVC)
"/ignore:4099"
)
endif()

# Workaround for MSVC 17.8 breaking change. (fixed in Qt 5.15.17)
add_compile_definitions(_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING)
elseif(UNIX OR MINGW)
add_compile_options(
"-fvisibility=hidden"
Expand Down
2 changes: 0 additions & 2 deletions helpers/g15helper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ set(G15HELPER_PLIST "${CMAKE_BINARY_DIR}/g15helper.plist")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/g15helper.plist.in" "${G15HELPER_PLIST}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/g15helper.rc.in" "${G15HELPER_RC}")

get_target_property(MUMBLE_SOURCE_DIR mumble SOURCE_DIR)

add_executable(g15-helper WIN32
"${CMAKE_SOURCE_DIR}/auxiliary_files/mumble.appcompat.manifest"
"${G15HELPER_RC}"
Expand Down
2 changes: 0 additions & 2 deletions overlay/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ if(64_BIT AND MSVC)
"-Dversion=${PROJECT_VERSION}"
${CMAKE_SOURCE_DIR}/overlay
CMAKE_GENERATOR_PLATFORM "Win32"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/overlay/overlay_xcompile-prefix
INSTALL_COMMAND ""
)
else()
Expand All @@ -194,7 +193,6 @@ if(64_BIT AND MSVC)
"-Dsymbols=${symbols}"
"-Dversion=${PROJECT_VERSION}"
${CMAKE_SOURCE_DIR}/overlay
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/overlay/overlay_xcompile-prefix
INSTALL_COMMAND ""
)
endif()
Expand Down
3 changes: 2 additions & 1 deletion plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if(retracted-plugins)
message(STATUS "Including retracted plugins")
endif()

add_custom_target(plugins ALL)

set(AVAILABLE_PLUGINS "")

Expand Down Expand Up @@ -123,5 +124,5 @@ foreach(CURRENT_PLUGIN IN LISTS AVAILABLE_PLUGINS)
install(TARGETS ${CURRENT_PLUGIN} LIBRARY DESTINATION "${MUMBLE_INSTALL_PLUGINDIR}" COMPONENT mumble_client)
endif()

add_dependencies(mumble ${CURRENT_PLUGIN})
add_dependencies(plugins ${CURRENT_PLUGIN})
endforeach()
9 changes: 9 additions & 0 deletions src/mumble/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -880,17 +880,25 @@ if(overlay)
"Overlay_win.cpp"
"Overlay_win.h"
)

add_dependencies(mumble overlay)
else()
if(APPLE)
target_sources(mumble_client_object_lib PRIVATE "Overlay_macx.mm")
else()
target_sources(mumble_client_object_lib PRIVATE "Overlay_unix.cpp")
endif()

add_dependencies(mumble overlay_gl)
endif()

target_compile_definitions(mumble_client_object_lib PUBLIC "USE_OVERLAY")
endif()

if(plugins)
add_dependencies(mumble plugins)
endif()

if(xboxinput)
target_sources(mumble_client_object_lib
PRIVATE
Expand Down Expand Up @@ -919,6 +927,7 @@ if(g15)
"G15LCDEngine_helper.h"
)
target_include_directories(mumble_client_object_lib PUBLIC "${CMAKE_SOURCE_DIR}/helpers")
add_dependencies(mumble g15-helper)
else()
find_library(LIB_G15DAEMON_CLIENT "g15daemon_client")
if(LIB_G15DAEMON_CLIENT-NOTFOUND)
Expand Down
5 changes: 3 additions & 2 deletions src/mumble/ConfigDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ void ConfigDialog::on_qlwIcons_currentItemChanged(QListWidgetItem *current, QLis
QWidget *w = qhPages.value(qmIconWidgets.value(current));
if (w)
qswPages->setCurrentWidget(w);

updateTabOrder();
if (previous) {
updateTabOrder();
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/mumble/GlobalShortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ ShortcutActionWidget::ShortcutActionWidget(QWidget *p) : QWidget(p) {
adjustSize();

KeyEventObserver *eventFilter = new KeyEventObserver(this, QEvent::KeyPress, true, { Qt::Key_Space });
connect(eventFilter, &KeyEventObserver::keyEventObserved, this, [=]() { m_comboBox->showPopup(); });
connect(eventFilter, &KeyEventObserver::keyEventObserved, this, [this]() { m_comboBox->showPopup(); });
installEventFilter(eventFilter);

QTreeWidget *treeWidget = qobject_cast< QTreeWidget * >(p->parentWidget());
Expand Down Expand Up @@ -385,7 +385,7 @@ ShortcutTargetWidget::ShortcutTargetWidget(QWidget *p) : QFrame(p) {
l->addWidget(qtbEdit);

KeyEventObserver *eventFilter = new KeyEventObserver(this, QEvent::KeyPress, true, { Qt::Key_Space });
connect(eventFilter, &KeyEventObserver::keyEventObserved, this, [=]() { qtbEdit->click(); });
connect(eventFilter, &KeyEventObserver::keyEventObserved, this, [this]() { qtbEdit->click(); });
installEventFilter(eventFilter);

QMetaObject::connectSlotsByName(this);
Expand All @@ -402,7 +402,7 @@ TextEditWidget::TextEditWidget(QWidget *p) : QWidget(p) {

KeyEventObserver *eventFilter = new KeyEventObserver(this, QEvent::KeyPress, true, { Qt::Key_Space });
connect(eventFilter, &KeyEventObserver::keyEventObserved, this,
[=]() { m_lineEdit->setFocus(Qt::MouseFocusReason); });
[this]() { m_lineEdit->setFocus(Qt::MouseFocusReason); });
installEventFilter(eventFilter);

QMetaObject::connectSlotsByName(this);
Expand Down
2 changes: 1 addition & 1 deletion src/mumble/ListenerVolumeSlider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

ListenerVolumeSlider::ListenerVolumeSlider(QWidget *parent) : VolumeSliderWidgetAction(parent), m_currentSendDelay(0) {
connect(&m_sendTimer, &QTimer::timeout, this, &ListenerVolumeSlider::sendToServer);
connect(&m_resetTimer, &QTimer::timeout, this, [=]() { m_currentSendDelay = 0; });
connect(&m_resetTimer, &QTimer::timeout, this, [this]() { m_currentSendDelay = 0; });

m_sendTimer.setSingleShot(true);
m_resetTimer.setSingleShot(true);
Expand Down
9 changes: 4 additions & 5 deletions src/mumble/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ MainWindow::MainWindow(QWidget *p)
#endif
forceQuit = false;
restartOnQuit = false;
bAutoUnmute = false;

Channel::add(Channel::ROOT_ID, tr("Root"));

Expand Down Expand Up @@ -2716,7 +2715,7 @@ void MainWindow::on_qaAudioDeaf_triggered() {
return;
}

if (!qaAudioDeaf->isChecked() && bAutoUnmute) {
if (!qaAudioDeaf->isChecked() && Global::get().s.unmuteOnUndeaf) {
qaAudioDeaf->setChecked(true);
qaAudioMute->setChecked(false);
on_qaAudioMute_triggered();
Expand All @@ -2730,13 +2729,13 @@ void MainWindow::on_qaAudioDeaf_triggered() {
Global::get().s.bDeaf = qaAudioDeaf->isChecked();

if (Global::get().s.bDeaf && !Global::get().s.bMute) {
bAutoUnmute = true;
Global::get().s.bMute = true;
Global::get().s.unmuteOnUndeaf = true;
Global::get().s.bMute = true;
qaAudioMute->setChecked(true);
Global::get().l->log(Log::SelfDeaf, tr("Muted and deafened."));
} else if (Global::get().s.bDeaf) {
Global::get().l->log(Log::SelfDeaf, tr("Deafened."));
bAutoUnmute = false;
Global::get().s.unmuteOnUndeaf = false;
} else {
Global::get().l->log(Log::SelfUndeaf, tr("Undeafened."));
}
Expand Down
1 change: 0 additions & 1 deletion src/mumble/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ class MainWindow : public QMainWindow, public Ui::MainWindow {
bool forceQuit;
/// Restart the client after shutdown
bool restartOnQuit;
bool bAutoUnmute;

/// Contains the cursor whose position is immediately before the image to
/// save when activating the "Save Image As..." context menu item.
Expand Down
1 change: 1 addition & 0 deletions src/mumble/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ struct Settings {
QString qsTxMuteCue = cqsDefaultMuteCue;

bool bTransmitPosition = false;
bool unmuteOnUndeaf = false;
bool bMute = false;
bool bDeaf = false;
bool bTTS = false;
Expand Down
1 change: 1 addition & 0 deletions src/mumble/SettingsKeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace SettingsKeys {
*/

// Audio settings
const SettingsKey UNMUTE_ON_UNDEAF_KEY = { "unmute_on_undeaf" };
const SettingsKey MUTE_KEY = { "mute" };
const SettingsKey DEAF_KEY = { "deaf" };
const SettingsKey TRANSMIT_MODE_KEY = { "transmit_mode" };
Expand Down
1 change: 1 addition & 0 deletions src/mumble/SettingsMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
PROCESS(misc, CRASH_EMAIL_ADDRESS_KEY, crashReportEmail)

#define AUDIO_SETTINGS \
PROCESS(audio, UNMUTE_ON_UNDEAF_KEY, unmuteOnUndeaf) \
PROCESS(audio, MUTE_KEY, bMute) \
PROCESS(audio, DEAF_KEY, bDeaf) \
PROCESS(audio, TRANSMIT_MODE_KEY, atTransmit) \
Expand Down
4 changes: 2 additions & 2 deletions src/mumble/VolumeSliderWidgetAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ VolumeSliderWidgetAction::VolumeSliderWidgetAction(QWidget *parent)
// clicks on the slider bar.
MouseClickEventObserver *mouseEventFilter = new MouseClickEventObserver(this, false);
m_volumeSlider->installEventFilter(mouseEventFilter);
connect(mouseEventFilter, &MouseClickEventObserver::clickEventObserved, this, [=]() {
connect(mouseEventFilter, &MouseClickEventObserver::clickEventObserved, this, [this]() {
m_volumeSlider->setFocus(Qt::TabFocusReason);
updateLabelValue(false);
});

// Also update the label explicitly when the slider body is released.
connect(m_volumeSlider, &QSlider::sliderReleased, this, [=]() {
connect(m_volumeSlider, &QSlider::sliderReleased, this, [this]() {
m_volumeSlider->setFocus(Qt::TabFocusReason);
updateLabelValue(false);
});
Expand Down
Loading