mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Mildly circuitously, accept ROM images.
This commit is contained in:
parent
09059ab869
commit
134a11b948
@ -758,12 +758,13 @@ void MainWindow::dropEvent(QDropEvent* event) {
|
|||||||
|
|
||||||
QString unusedRoms;
|
QString unusedRoms;
|
||||||
for(const auto &url: event->mimeData()->urls()) {
|
for(const auto &url: event->mimeData()->urls()) {
|
||||||
const char *const name = url.toLocalFile().toUtf8();
|
const std::string name = url.toLocalFile().toStdString();
|
||||||
FILE *const file = fopen(name, "rb");
|
FILE *const file = fopen(name.c_str(), "rb");
|
||||||
if(!file) continue;
|
if(!file) continue;
|
||||||
const auto contents = fileContentsAndClose(file);
|
const auto contents = fileContentsAndClose(file);
|
||||||
if(!contents) continue;
|
if(!contents) continue;
|
||||||
|
|
||||||
|
|
||||||
CRC::CRC32 generator;
|
CRC::CRC32 generator;
|
||||||
const uint32_t crc = generator.compute_crc(*contents);
|
const uint32_t crc = generator.compute_crc(*contents);
|
||||||
|
|
||||||
|
@ -1170,9 +1170,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPlainTextEdit" name="missingROMsBox">
|
<widget class="QPlainTextEdit" name="missingROMsBox">
|
||||||
<property name="acceptDrops">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user