diff --git a/projectfiles/QtCreator/TOX-Qt-GUI.pro b/projectfiles/QtCreator/TOX-Qt-GUI.pro index fdb38e8..07d9823 100644 --- a/projectfiles/QtCreator/TOX-Qt-GUI.pro +++ b/projectfiles/QtCreator/TOX-Qt-GUI.pro @@ -33,6 +33,7 @@ QT += core gui widgets TARGET = TOX-Qt-GUI TEMPLATE = app +QMAKE_CXX = g++-4.8 CONFIG += c++11 INCLUDEPATH += ../../src/ ../../submodules/ProjectTox-Core/toxcore/ diff --git a/src/inputtextwidget.cpp b/src/inputtextwidget.cpp index 7df59c9..2874a7d 100644 --- a/src/inputtextwidget.cpp +++ b/src/inputtextwidget.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include "smileypack.hpp" #include "Settings/settings.hpp" @@ -80,6 +81,8 @@ void InputTextWidget::keyPressEvent(QKeyEvent* event) // Send message on Return if ((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) && (event->modifiers() == Qt::NoModifier || event->modifiers() == Qt::KeypadModifier)) { + if (toPlainText().trimmed().isEmpty()) + return; if (toPlainText().startsWith("/me ") ) { QString html = toHtml(); html.remove(html.indexOf("/me "), 4);