Open
Conversation
chirsz-ever
reviewed
Dec 11, 2019
src/chatdialog.cpp
Outdated
| insertOutMessage(ui->contentBox->toPlainText()); | ||
| emit newMessage(sender,receiver,QDateTime::currentDateTime(),ui->contentBox->toPlainText()); | ||
| QString text=ui->contentBox->toPlainText(); | ||
| if(text!="") |
Collaborator
There was a problem hiding this comment.
这里以及类似的用法都改成调用 isEmpty 判断
chirsz-ever
reviewed
Dec 11, 2019
src/chatdialog.cpp
Outdated
|
|
||
| void ChatDialog::on_photoBtn_clicked() | ||
| { | ||
| strFilePath = QFileDialog::getOpenFileName(this, QString::fromLocal8Bit("选择上传图片"), "./", tr("Image files(*.bmp *.jpg *.pbm *.pgm *.png *.ppm *.xbm *.xpm *.jpeg);;All files (*.*)")); |
chirsz-ever
reviewed
Dec 11, 2019
src/chatdialog.h
Outdated
| QTextCursor save; | ||
| int savepos; | ||
|
|
||
| QString strFilePath; |
Collaborator
There was a problem hiding this comment.
这三项不应该成为 ChatDialog 的类成员
chirsz-ever
reviewed
Dec 11, 2019
src/chatdialog.h
Outdated
| #include <QTextFrame> | ||
| #include <QDateTime> | ||
| #include <QXmppMessage.h> | ||
| #include <QFileDialog> |
Collaborator
There was a problem hiding this comment.
减少头文件中不必要的 #include 语句
Collaborator
|
另,建议不要在 master 分支上直接 commit,而是新建分支进行修改,以使 fork 仓库的 master 与源仓库的 master 保持一致。 |
Collaborator
|
当前实现中发送图片是发送 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.