add debug window
This commit is contained in:
parent
a2704f788e
commit
af1c5b2237
|
@ -3,7 +3,8 @@ Linux 平台基于 Qt 的文字编辑程序。
|
|||
已编译好的 HTYEdit 程序适用 64 位 Linux 系统 Qt5 环境,双击运行,其他版本请自行编译。
|
||||
|
||||

|
||||
|
||||

|
||||
### 1.3 新增调试窗口
|
||||
### 1.1 [新增语法高亮](http://www.cnblogs.com/lenxvp/p/5475931.html)
|
||||
高亮类具体工作过程没看懂,因为很好用先用着。
|
||||
|
||||
|
|
|
@ -527,7 +527,12 @@ void MainWindow::updateCommand()
|
|||
if (suffix == "c" || suffix == "cpp") {
|
||||
ui->textBrowser->show();
|
||||
QString s = ((QTextEdit*)(ui->mdiArea->currentSubWindow()->widget()))->toPlainText();
|
||||
if (s.contains("#include <GL/")) {
|
||||
QStringList SL;
|
||||
foreach (const QString &str, s.split("\n")) {
|
||||
if (str.startsWith("#include"))
|
||||
SL += str;
|
||||
}
|
||||
if (SL.contains("#include <GL/")) {
|
||||
lineEdit_command->setText("g++ %1 -o %2 -l GL -l GLU -l glut");
|
||||
} else {
|
||||
lineEdit_command->setText("g++ %1 -o %2");
|
||||
|
|
Loading…
Reference in New Issue