diff options
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/gui/src/ActionDialog.cpp | 1 | ||||
| -rw-r--r-- | src/gui/src/NewScreenWidget.cpp | 2 | ||||
| -rw-r--r-- | src/gui/src/ScreenSettingsDialog.cpp | 21 | ||||
| -rw-r--r-- | src/gui/src/ScreenSetupView.cpp | 1 | ||||
| -rw-r--r-- | src/gui/src/SettingsDialogBase.ui | 2 | ||||
| -rw-r--r-- | src/gui/src/SslCertificate.cpp | 2 |
7 files changed, 23 insertions, 11 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 9c90286..9eaa67e 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -22,7 +22,7 @@ add_executable (barrier WIN32 include_directories (./src) -qt5_use_modules (barrier Core Widgets Network) +target_link_libraries (barrier Qt5::Core Qt5::Widgets Qt5::Network) target_compile_definitions (barrier PRIVATE -DBARRIER_VERSION_STAGE="${BARRIER_VERSION_STAGE}") target_compile_definitions (barrier PRIVATE -DBARRIER_REVISION="${BARRIER_REVISION}") @@ -36,8 +36,7 @@ if (WIN32) elseif (APPLE) find_library(APPSERVICES_LIB ApplicationServices) target_link_libraries(barrier ${APPSERVICES_LIB}) -elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR - ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") +else() target_link_libraries (barrier dns_sd) endif() diff --git a/src/gui/src/ActionDialog.cpp b/src/gui/src/ActionDialog.cpp index e824ea3..3565cfb 100644 --- a/src/gui/src/ActionDialog.cpp +++ b/src/gui/src/ActionDialog.cpp @@ -25,6 +25,7 @@ #include <QtCore> #include <QtGui> +#include <QButtonGroup> ActionDialog::ActionDialog(QWidget* parent, ServerConfig& config, Hotkey& hotkey, Action& action) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint), diff --git a/src/gui/src/NewScreenWidget.cpp b/src/gui/src/NewScreenWidget.cpp index 18379c0..0336249 100644 --- a/src/gui/src/NewScreenWidget.cpp +++ b/src/gui/src/NewScreenWidget.cpp @@ -1,4 +1,4 @@ -/* +/* * barrier -- mouse and keyboard sharing utility * Copyright (C) 2012-2016 Symless Ltd. * Copyright (C) 2008 Volker Lanz (vl@fidra.de) diff --git a/src/gui/src/ScreenSettingsDialog.cpp b/src/gui/src/ScreenSettingsDialog.cpp index 1e95a9c..4f294e2 100644 --- a/src/gui/src/ScreenSettingsDialog.cpp +++ b/src/gui/src/ScreenSettingsDialog.cpp @@ -23,6 +23,19 @@ #include <QtGui> #include <QMessageBox> +static const QRegExp ValidScreenName("[a-z0-9\\._-]{,255}", Qt::CaseInsensitive); + +static QString check_name_param(QString name) +{ + // after internationalization happens the default name "Unnamed" might + // be translated with spaces (or other chars). let's replace the spaces + // with dashes and just give up if that doesn't pass the regexp + name.replace(' ', '-'); + if (ValidScreenName.exactMatch(name)) + return name; + return ""; +} + ScreenSettingsDialog::ScreenSettingsDialog(QWidget* parent, Screen* pScreen) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint), Ui::ScreenSettingsDialogBase(), @@ -30,13 +43,11 @@ ScreenSettingsDialog::ScreenSettingsDialog(QWidget* parent, Screen* pScreen) : { setupUi(this); - QRegExp validScreenName("[a-z0-9\\._-]{,255}", Qt::CaseInsensitive); - - m_pLineEditName->setText(m_pScreen->name()); - m_pLineEditName->setValidator(new QRegExpValidator(validScreenName, m_pLineEditName)); + m_pLineEditName->setText(check_name_param(m_pScreen->name())); + m_pLineEditName->setValidator(new QRegExpValidator(ValidScreenName, m_pLineEditName)); m_pLineEditName->selectAll(); - m_pLineEditAlias->setValidator(new QRegExpValidator(validScreenName, m_pLineEditName)); + m_pLineEditAlias->setValidator(new QRegExpValidator(ValidScreenName, m_pLineEditName)); for (int i = 0; i < m_pScreen->aliases().count(); i++) new QListWidgetItem(m_pScreen->aliases()[i], m_pListAliases); diff --git a/src/gui/src/ScreenSetupView.cpp b/src/gui/src/ScreenSetupView.cpp index e42ae17..46e7099 100644 --- a/src/gui/src/ScreenSetupView.cpp +++ b/src/gui/src/ScreenSetupView.cpp @@ -22,6 +22,7 @@ #include <QtCore> #include <QtGui> +#include <QHeaderView> ScreenSetupView::ScreenSetupView(QWidget* parent) : QTableView(parent) diff --git a/src/gui/src/SettingsDialogBase.ui b/src/gui/src/SettingsDialogBase.ui index 432ec0d..d75c18c 100644 --- a/src/gui/src/SettingsDialogBase.ui +++ b/src/gui/src/SettingsDialogBase.ui @@ -167,7 +167,7 @@ <item row="1" column="0"> <widget class="QLabel" name="m_pLabel_21"> <property name="text"> - <string>&Interface:</string> + <string>&Address:</string> </property> <property name="buddy"> <cstring>m_pLineEditInterface</cstring> diff --git a/src/gui/src/SslCertificate.cpp b/src/gui/src/SslCertificate.cpp index 9b31c5d..80fdfc2 100644 --- a/src/gui/src/SslCertificate.cpp +++ b/src/gui/src/SslCertificate.cpp @@ -121,7 +121,7 @@ void SslCertificate::generateCertificate() // private key arguments.append("-newkey"); - arguments.append("rsa:1024"); + arguments.append("rsa:2048"); QDir sslDir(sslDirPath); if (!sslDir.exists()) { |
