From: Teemu Hukkanen Date: Sat, 8 Nov 2014 10:15:16 +0000 (+0000) Subject: QString no longer supports toAscii, use toUtf8 instead X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddac3e0e78a5c4b0236bdeaff18cf9a3ac4ba4f7;hp=5ae68cf3e1b1a38f30d4201ec41ca761a72d3c96;p=virtualjaguar QString no longer supports toAscii, use toUtf8 instead --- diff --git a/src/gui/app.cpp b/src/gui/app.cpp index 8cf3f1e..e0b942b 100644 --- a/src/gui/app.cpp +++ b/src/gui/app.cpp @@ -146,7 +146,7 @@ App::App(int & argc, char * argv[]): QApplication(argc, argv) mainWindow->LoadFile(filename); if (!mainWindow->cartridgeLoaded) - printf("Could not load file \"%s\"!\n", filename.toAscii().data()); + printf("Could not load file \"%s\"!\n", filename.toUtf8().data()); } mainWindow->show(); diff --git a/src/gui/configdialog.cpp b/src/gui/configdialog.cpp index 3f870fc..42942f0 100644 --- a/src/gui/configdialog.cpp +++ b/src/gui/configdialog.cpp @@ -104,9 +104,9 @@ void ConfigDialog::UpdateVJSettings(void) // strcpy(vjs.jagBootPath, generalTab->edit1->text().toAscii().data()); // strcpy(vjs.CDBootPath, generalTab->edit2->text().toAscii().data()); strcpy(vjs.EEPROMPath, CheckForTrailingSlash( - generalTab->edit3->text()).toAscii().data()); + generalTab->edit3->text()).toUtf8().data()); strcpy(vjs.ROMPath, CheckForTrailingSlash( - generalTab->edit4->text()).toAscii().data()); + generalTab->edit4->text()).toUtf8().data()); vjs.useJaguarBIOS = generalTab->useBIOS->isChecked(); vjs.GPUEnabled = generalTab->useGPU->isChecked(); @@ -117,8 +117,8 @@ void ConfigDialog::UpdateVJSettings(void) if (vjs.hardwareTypeAlpine) { - strcpy(vjs.alpineROMPath, alpineTab->edit1->text().toAscii().data()); - strcpy(vjs.absROMPath, alpineTab->edit2->text().toAscii().data()); + strcpy(vjs.alpineROMPath, alpineTab->edit1->text().toUtf8().data()); + strcpy(vjs.absROMPath, alpineTab->edit2->text().toUtf8().data()); vjs.allowWritesToROM = alpineTab->writeROM->isChecked(); } diff --git a/src/gui/controllertab.cpp b/src/gui/controllertab.cpp index bd73c2b..fe4c62b 100644 --- a/src/gui/controllertab.cpp +++ b/src/gui/controllertab.cpp @@ -222,7 +222,7 @@ void ControllerTab::AddMapName(void) // Add mapping... profileNum = freeProfile; profile[profileNum].device = deviceList->itemData(deviceList->currentIndex()).toInt(); - strncpy(profile[profileNum].mapName, text.toAscii().data(), 31); + strncpy(profile[profileNum].mapName, text.toUtf8().data(), 31); profile[profileNum].mapName[31] = 0; profile[profileNum].preferredSlot = CONTROLLER1; diff --git a/src/gui/filethread.cpp b/src/gui/filethread.cpp index 01397e4..e3b5ffd 100644 --- a/src/gui/filethread.cpp +++ b/src/gui/filethread.cpp @@ -104,7 +104,7 @@ void FileThread::HandleFile(QFileInfo fileInfo) // ZIP files are special: They contain more than just the software now... ;-) // So now we fish around inside them to pull out the stuff we want. // Probably also need more stringent error checking as well... :-O - fileSize = GetFileFromZIP(fileInfo.filePath().toAscii(), FT_SOFTWARE, buffer); + fileSize = GetFileFromZIP(fileInfo.filePath().toUtf8(), FT_SOFTWARE, buffer); if (fileSize == 0) return; @@ -162,7 +162,7 @@ void FileThread::HandleFile(QFileInfo fileInfo) // See if we can fish out a label. :-) if (haveZIPFile) { - uint32_t size = GetFileFromZIP(fileInfo.filePath().toAscii(), FT_LABEL, buffer); + uint32_t size = GetFileFromZIP(fileInfo.filePath().toUtf8(), FT_LABEL, buffer); //printf("FT: Label size = %u bytes.\n", size); if (size > 0) diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index e84be10..2936305 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -962,7 +962,7 @@ void MainWin::LoadSoftware(QString file) powerButtonOn = false; TogglePowerState(); // We have to load our software *after* the Jaguar RESET - cartridgeLoaded = JaguarLoadFile(file.toAscii().data()); + cartridgeLoaded = JaguarLoadFile(file.toUtf8().data()); SET32(jaguarMainRAM, 0, 0x00200000); // Set top of stack... // This is icky because we've already done it diff --git a/src/gui/profile.cpp b/src/gui/profile.cpp index 6e43ad0..484d4b4 100644 --- a/src/gui/profile.cpp +++ b/src/gui/profile.cpp @@ -96,7 +96,7 @@ void ReadProfiles(QSettings * set) for(int i=1; isetArrayIndex(i - 1); - strcpy(deviceNames[i], set->value("deviceName").toString().toAscii().data()); + strcpy(deviceNames[i], set->value("deviceName").toString().toUtf8().data()); #ifdef DEBUG_PROFILES printf("Read device name: %s\n", deviceNames[i]); #endif @@ -112,7 +112,7 @@ printf("Number of profiles: %u\n", numberOfProfiles); { set->setArrayIndex(i); profile[i].device = set->value("deviceNum").toInt(); - strcpy(profile[i].mapName, set->value("mapName").toString().toAscii().data()); + strcpy(profile[i].mapName, set->value("mapName").toString().toUtf8().data()); profile[i].preferredSlot = set->value("preferredSlot").toInt(); for(int j=0; j<21; j++)