Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fairycn committed Sep 22, 2023
1 parent 6955b74 commit b12c0bd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"ranges": "cpp"
}
}
2 changes: 1 addition & 1 deletion pe-bear/DisasmView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void DisasmTreeView::copySelected()
}
QMimeData *mimeData = new QMimeData;
mimeData->setText(getSelectedText("\t", "\n"));
mimeData->setData(tr("application/octet-stream"), bytes);
mimeData->setData("application/octet-stream", bytes);
QApplication::clipboard()->setMimeData(mimeData);
}

Expand Down
6 changes: 3 additions & 3 deletions pe-bear/HexView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ void HexTableView::copySelected()
//mimeData->setText(getSelectedText(separator, separator));
QString text = getSelectedText(separator, separator);
#if QT_VERSION >= 0x050000
mimeData->setData(tr("text/plain"), text.toLatin1());
mimeData->setData("text/plain", text.toLatin1());
#else
mimeData->setData(tr("text/plain"), text.toAscii());
mimeData->setData("text/plain", text.toAscii());
#endif
mimeData->setData(tr("application/octet-stream"), bytes);
mimeData->setData("application/octet-stream", bytes);
QApplication::clipboard()->setMimeData(mimeData);
}

Expand Down
1 change: 1 addition & 0 deletions pe-bear/gui/windows/SectionAddWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,5 @@ void SectionAddWindow::onOkClicked()

QMessageBox::information(this, tr("Success!"), tr("Section ")+ name + tr(" added!"));
this->hide();

}
2 changes: 1 addition & 1 deletion pe-bear/gui/windows/UserConfigWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void DirEdit::validateDir(const QString &input)
{
QDir dir(input);
if (dir.exists() == false) {
this->setStyleSheet(tr("border: 2px solid red;"));
this->setStyleSheet("border: 2px solid red;");
} else {
this->setStyleSheet("");
}
Expand Down
7 changes: 2 additions & 5 deletions pe-bear/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ int main(int argc, char *argv[])

QApplication app(argc, argv);
// Load language file
QApplication a(argc, argv);
QTranslator translator;
if (translator.load("Language\\PELanguage.qm"))
{
a.installTranslator(&translator);
if (translator.load("Language\\PELanguage.qm")) {
app.installTranslator(&translator);
}
// workaround for a bug in Qt (not setting default font properly)
QApplication::setFont(QApplication::font("QMessageBox"));
Expand Down

0 comments on commit b12c0bd

Please sign in to comment.