]> Shamusworld >> Repos - virtualjaguar/commitdiff
QString no longer supports toAscii, use toUtf8 instead
authorTeemu Hukkanen <tjhukkan@iki.fi>
Sat, 8 Nov 2014 10:15:16 +0000 (10:15 +0000)
committerTeemu Hukkanen <tjhukkan@iki.fi>
Sat, 8 Nov 2014 10:15:16 +0000 (10:15 +0000)
src/gui/app.cpp
src/gui/configdialog.cpp
src/gui/controllertab.cpp
src/gui/filethread.cpp
src/gui/mainwin.cpp
src/gui/profile.cpp

index 8cf3f1ea36159d02ac15ea9cf61dfd763b0249f5..e0b942be432bcf05c4120d7a2e7cb4f7c915f5b4 100644 (file)
@@ -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();
index 3f870fcc95b7ec6c0fa4f14a3b2a5c9cbec562b2..42942f0eb7fb4022de7ea6744ef75811f94ec875 100644 (file)
@@ -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();
        }
 
index bd73c2b0f8bc8e3afdc0c9c2df6b572f02e86407..fe4c62b3e964b5384d2670f086ab18500e9f99f1 100644 (file)
@@ -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;
 
index 01397e4362bd52cfe6d5def6e692e1d06dc45ff5..e3b5ffd48a364ee2a12df75373088f244e1f7721 100644 (file)
@@ -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)
index e84be10b4af5ec19350681e092211dafc90cfe13..29363055dd2c86d34fbea135bb0d1e6df37ab648 100644 (file)
@@ -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
index 6e43ad0da677502d6bb6160b3bf7a1d0154d4556..484d4b4f8e79f01d07b837d5661c432cd0d2b99e 100644 (file)
@@ -96,7 +96,7 @@ void ReadProfiles(QSettings * set)
        for(int i=1; i<numberOfDevices; i++)
        {
                set->setArrayIndex(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++)