diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..f626912 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "ranges": "cpp" + } +} \ No newline at end of file diff --git a/pe-bear/DisasmView.cpp b/pe-bear/DisasmView.cpp index e281cbc..0af4116 100644 --- a/pe-bear/DisasmView.cpp +++ b/pe-bear/DisasmView.cpp @@ -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); } diff --git a/pe-bear/HexView.cpp b/pe-bear/HexView.cpp index 6f46400..bb7c6f4 100644 --- a/pe-bear/HexView.cpp +++ b/pe-bear/HexView.cpp @@ -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); } diff --git a/pe-bear/gui/windows/SectionAddWindow.cpp b/pe-bear/gui/windows/SectionAddWindow.cpp index 6750009..36d1864 100644 --- a/pe-bear/gui/windows/SectionAddWindow.cpp +++ b/pe-bear/gui/windows/SectionAddWindow.cpp @@ -146,4 +146,5 @@ void SectionAddWindow::onOkClicked() QMessageBox::information(this, tr("Success!"), tr("Section ")+ name + tr(" added!")); this->hide(); + } \ No newline at end of file diff --git a/pe-bear/gui/windows/UserConfigWindow.cpp b/pe-bear/gui/windows/UserConfigWindow.cpp index 4e64cf3..9f31da3 100644 --- a/pe-bear/gui/windows/UserConfigWindow.cpp +++ b/pe-bear/gui/windows/UserConfigWindow.cpp @@ -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(""); } diff --git a/pe-bear/main.cpp b/pe-bear/main.cpp index 621d412..9c6a667 100644 --- a/pe-bear/main.cpp +++ b/pe-bear/main.cpp @@ -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"));