mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
Fix compose events with empty text (since text is in rich format then it was never really empty).
Move QApplication::setAttribute to beginning.
This commit is contained in:
parent
8e6880a334
commit
411f64e4c0
4 changed files with 10 additions and 7 deletions
|
|
@ -43,6 +43,10 @@ AppController::AppController (int &argc, char *argv[]) {
|
|||
Q_ASSERT(!mApp);
|
||||
// Disable QML cache. Avoid malformed cache.
|
||||
qputenv("QML_DISABLE_DISK_CACHE", "true");
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
// Useful to share camera on Fullscreen (other context)
|
||||
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
||||
|
||||
initQtAppDetails();
|
||||
#ifdef ENABLE_APP_WEBVIEW
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
||||
|
|
@ -121,10 +125,6 @@ void AppController::stopApp(){
|
|||
}
|
||||
|
||||
void AppController::initQtAppDetails(){
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
// Useful to share camera on Fullscreen (other context)
|
||||
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
||||
|
||||
// Do not use APPLICATION_NAME here.
|
||||
// The EXECUTABLE_NAME will be used in qt standard paths. It's our goal.
|
||||
QCoreApplication::setApplicationName(EXECUTABLE_NAME);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ CREATE_PARENT_MODEL_FUNCTION(deleteChatRoom)
|
|||
|
||||
|
||||
void ChatRoomProxyModel::compose (const QString& text) {
|
||||
if (mChatRoomModel)
|
||||
if (mChatRoomModel && !text.isEmpty())
|
||||
mChatRoomModel->compose();
|
||||
gCachedText = text;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@ Item {
|
|||
function insert(text){
|
||||
textArea.insert(textArea.cursorPosition, text)
|
||||
}
|
||||
function getText(){
|
||||
return textArea.getText(0, textArea.text.length)
|
||||
}
|
||||
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
|
|
@ -413,12 +413,12 @@ Rectangle {
|
|||
emojiVisible: chatEmojis.visible
|
||||
|
||||
onDropped: Logic.handleFilesDropped(files)
|
||||
onTextChanged: Logic.handleTextChanged(text)
|
||||
onTextChanged: Logic.handleTextChanged(getText())
|
||||
onValidText: {
|
||||
textArea.text = ''
|
||||
chat.bindToEnd = true
|
||||
if(proxyModel.chatRoomModel) {
|
||||
proxyModel.sendMessage(text)
|
||||
proxyModel.sendMessage(text)//Note : 'text' is coming from validText. It's not the text member.
|
||||
}else{
|
||||
proxyModel.chatRoomModel = CallsListModel.createChat(proxyModel.peerAddress)
|
||||
proxyModel.sendMessage(text)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue