404 |
m_iDirtyCount++; |
m_iDirtyCount++; |
405 |
stabilizeForm(); |
stabilizeForm(); |
406 |
} // Otherwise, load an usual session file (LSCP script)... |
} // Otherwise, load an usual session file (LSCP script)... |
407 |
else if (closeSession(true)) |
else if (closeSession(true)) { |
408 |
loadSessionFile(sPath); |
loadSessionFile(sPath); |
409 |
|
break; |
410 |
|
} |
411 |
// Make it look responsive...:) |
// Make it look responsive...:) |
412 |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
413 |
} |
} |
625 |
} |
} |
626 |
|
|
627 |
|
|
628 |
|
// Reset current session. |
629 |
|
bool qsamplerMainForm::resetSession (void) |
630 |
|
{ |
631 |
|
#ifdef CONFIG_MIDI_INSTRUMENT |
632 |
|
// Reset all MIDI instrument mapping, if any. |
633 |
|
int *piMaps = ::lscp_list_midi_instrument_maps(m_pClient); |
634 |
|
for (int iMap = 0; piMaps && piMaps[iMap] >= 0; ++iMap) { |
635 |
|
int iMidiMap = piMaps[iMap]; |
636 |
|
if (::lscp_clear_midi_instruments(m_pClient, iMidiMap) != LSCP_OK) |
637 |
|
appendMessagesClient("lscp_clear_midi_instruments"); |
638 |
|
if (::lscp_remove_midi_instrument_map(m_pClient, iMidiMap) != LSCP_OK) |
639 |
|
appendMessagesClient("lscp_remove_midi_instrument_map"); |
640 |
|
} |
641 |
|
// Check for errors... |
642 |
|
if (piMaps == NULL && ::lscp_client_get_errno(m_pClient)) |
643 |
|
appendMessagesClient("lscp_list_midi_instrument_maps"); |
644 |
|
#endif // CONFIG_MIDI_INSTRUMENT |
645 |
|
|
646 |
|
// Do the actual sampler reset... |
647 |
|
if (::lscp_reset_sampler(m_pClient) != LSCP_OK) { |
648 |
|
appendMessagesClient("lscp_reset_sampler"); |
649 |
|
appendMessagesError(tr("Could not reset sampler instance.\n\nSorry.")); |
650 |
|
return false; |
651 |
|
} |
652 |
|
|
653 |
|
// Done. |
654 |
|
return true; |
655 |
|
} |
656 |
|
|
657 |
|
|
658 |
// Load a session from specific file path. |
// Load a session from specific file path. |
659 |
bool qsamplerMainForm::loadSessionFile ( const QString& sFilename ) |
bool qsamplerMainForm::loadSessionFile ( const QString& sFilename ) |
660 |
{ |
{ |
668 |
return false; |
return false; |
669 |
} |
} |
670 |
|
|
671 |
|
// Tell the world we'll take some time... |
672 |
|
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); |
673 |
|
|
674 |
// Read the file. |
// Read the file. |
675 |
|
int iLine = 0; |
676 |
int iErrors = 0; |
int iErrors = 0; |
677 |
QTextStream ts(&file); |
QTextStream ts(&file); |
678 |
while (!ts.atEnd()) { |
while (!ts.atEnd()) { |
679 |
// Read the line. |
// Read the line. |
680 |
QString sCommand = ts.readLine().stripWhiteSpace(); |
QString sCommand = ts.readLine().stripWhiteSpace(); |
681 |
|
iLine++; |
682 |
// If not empty, nor a comment, call the server... |
// If not empty, nor a comment, call the server... |
683 |
if (!sCommand.isEmpty() && sCommand[0] != '#') { |
if (!sCommand.isEmpty() && sCommand[0] != '#') { |
684 |
appendMessagesColor(sCommand, "#996633"); |
// HACK: A very special trap for the global RESET command... |
685 |
// Remember that, no matter what, |
if (sCommand == "RESET") { |
686 |
// all LSCP commands are CR/LF terminated. |
// Do our own reset... |
687 |
sCommand += "\r\n"; |
if (!resetSession()) |
688 |
if (::lscp_client_query(m_pClient, sCommand.latin1()) != LSCP_OK) { |
iErrors++; |
689 |
appendMessagesClient("lscp_client_query"); |
} else { |
690 |
iErrors++; |
// Remember that, no matter what, |
691 |
} |
// all LSCP commands are CR/LF terminated. |
692 |
|
sCommand += "\r\n"; |
693 |
|
if (::lscp_client_query(m_pClient, sCommand.latin1()) != LSCP_OK) { |
694 |
|
appendMessagesColor(QString("%1(%2): %3") |
695 |
|
.arg(QFileInfo(sFilename).fileName()).arg(iLine) |
696 |
|
.arg(sCommand.simplifyWhiteSpace()), "#996633"); |
697 |
|
appendMessagesClient("lscp_client_query"); |
698 |
|
iErrors++; |
699 |
|
} |
700 |
|
} |
701 |
} |
} |
702 |
// Try to make it snappy :) |
// Try to make it snappy :) |
703 |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
709 |
// Now we'll try to create (update) the whole GUI session. |
// Now we'll try to create (update) the whole GUI session. |
710 |
updateSession(); |
updateSession(); |
711 |
|
|
712 |
|
// We're fornerly done. |
713 |
|
QApplication::restoreOverrideCursor(); |
714 |
|
|
715 |
// Have we any errors? |
// Have we any errors? |
716 |
if (iErrors > 0) |
if (iErrors > 0) |
717 |
appendMessagesError(tr("Session loaded with errors\nfrom \"%1\".\n\nSorry.").arg(sFilename)); |
appendMessagesError(tr("Session loaded with errors\nfrom \"%1\".\n\nSorry.").arg(sFilename)); |
735 |
// Save current session to specific file path. |
// Save current session to specific file path. |
736 |
bool qsamplerMainForm::saveSessionFile ( const QString& sFilename ) |
bool qsamplerMainForm::saveSessionFile ( const QString& sFilename ) |
737 |
{ |
{ |
738 |
|
if (m_pClient == NULL) |
739 |
|
return false; |
740 |
|
|
741 |
|
// Check whether server is apparently OK... |
742 |
|
if (::lscp_get_channels(m_pClient) < 0) { |
743 |
|
appendMessagesClient("lscp_get_channels"); |
744 |
|
return false; |
745 |
|
} |
746 |
|
|
747 |
// Open and write into real file. |
// Open and write into real file. |
748 |
QFile file(sFilename); |
QFile file(sFilename); |
749 |
if (!file.open(IO_WriteOnly | IO_Truncate)) { |
if (!file.open(IO_WriteOnly | IO_Truncate)) { |
751 |
return false; |
return false; |
752 |
} |
} |
753 |
|
|
754 |
|
// Tell the world we'll take some time... |
755 |
|
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); |
756 |
|
|
757 |
// Write the file. |
// Write the file. |
758 |
int iErrors = 0; |
int iErrors = 0; |
759 |
QTextStream ts(&file); |
QTextStream ts(&file); |
770 |
<< " " << QTime::currentTime().toString("hh:mm:ss") << endl; |
<< " " << QTime::currentTime().toString("hh:mm:ss") << endl; |
771 |
ts << "#" << endl; |
ts << "#" << endl; |
772 |
ts << endl; |
ts << endl; |
773 |
|
|
774 |
// It is assumed that this new kind of device+session file |
// It is assumed that this new kind of device+session file |
775 |
// will be loaded from a complete |
// will be loaded from a complete initialized server... |
776 |
int *piDeviceIDs; |
int *piDeviceIDs; |
777 |
int iDevice; |
int iDevice; |
778 |
ts << "RESET" << endl; |
ts << "RESET" << endl; |
779 |
|
|
780 |
// Audio device mapping. |
// Audio device mapping. |
781 |
QMap<int, int> audioDeviceMap; |
QMap<int, int> audioDeviceMap; |
782 |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Audio); |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Audio); |
814 |
} |
} |
815 |
// Audio device index/id mapping. |
// Audio device index/id mapping. |
816 |
audioDeviceMap[device.deviceID()] = iDevice; |
audioDeviceMap[device.deviceID()] = iDevice; |
817 |
// Try to keep it snappy :) |
// Try to keep it snappy :) |
818 |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
819 |
} |
} |
820 |
|
|
821 |
// MIDI device mapping. |
// MIDI device mapping. |
822 |
QMap<int, int> midiDeviceMap; |
QMap<int, int> midiDeviceMap; |
823 |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Midi); |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Midi); |
855 |
} |
} |
856 |
// MIDI device index/id mapping. |
// MIDI device index/id mapping. |
857 |
midiDeviceMap[device.deviceID()] = iDevice; |
midiDeviceMap[device.deviceID()] = iDevice; |
858 |
// Try to keep it snappy :) |
// Try to keep it snappy :) |
859 |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
860 |
} |
} |
861 |
ts << endl; |
ts << endl; |
862 |
|
|
863 |
|
#ifdef CONFIG_MIDI_INSTRUMENT |
864 |
|
// MIDI instrument mapping... |
865 |
|
QMap<int, int> midiInstrumentMap; |
866 |
|
int *piMaps = ::lscp_list_midi_instrument_maps(m_pClient); |
867 |
|
for (int iMap = 0; piMaps && piMaps[iMap] >= 0; iMap++) { |
868 |
|
int iMidiMap = piMaps[iMap]; |
869 |
|
const char *pszMapName |
870 |
|
= ::lscp_get_midi_instrument_map_name(m_pClient, iMidiMap); |
871 |
|
ts << "# " << tr("MIDI instrument map") << " " << iMap; |
872 |
|
if (pszMapName) |
873 |
|
ts << " - " << pszMapName; |
874 |
|
ts << endl; |
875 |
|
ts << "ADD MIDI_INSTRUMENT_MAP"; |
876 |
|
if (pszMapName) |
877 |
|
ts << " '" << pszMapName << "'"; |
878 |
|
ts << endl; |
879 |
|
// MIDI instrument mapping... |
880 |
|
lscp_midi_instrument_t *pInstrs |
881 |
|
= ::lscp_list_midi_instruments(m_pClient, iMidiMap); |
882 |
|
for (int iInstr = 0; pInstrs && pInstrs[iInstr].map >= 0; iInstr++) { |
883 |
|
lscp_midi_instrument_info_t *pInstrInfo |
884 |
|
= ::lscp_get_midi_instrument_info(m_pClient, &pInstrs[iInstr]); |
885 |
|
if (pInstrInfo) { |
886 |
|
ts << "MAP MIDI_INSTRUMENT " |
887 |
|
<< iMap << " " |
888 |
|
<< pInstrs[iInstr].bank << " " |
889 |
|
<< pInstrs[iInstr].prog << " " |
890 |
|
<< pInstrInfo->engine_name << " '" |
891 |
|
<< pInstrInfo->instrument_file << "' " |
892 |
|
<< pInstrInfo->instrument_nr << " " |
893 |
|
<< pInstrInfo->volume << " "; |
894 |
|
switch (pInstrInfo->load_mode) { |
895 |
|
case LSCP_LOAD_PERSISTENT: |
896 |
|
ts << "PERSISTENT"; |
897 |
|
break; |
898 |
|
case LSCP_LOAD_ON_DEMAND_HOLD: |
899 |
|
ts << "ON_DEMAND_HOLD"; |
900 |
|
break; |
901 |
|
case LSCP_LOAD_ON_DEMAND: |
902 |
|
case LSCP_LOAD_DEFAULT: |
903 |
|
default: |
904 |
|
ts << "ON_DEMAND"; |
905 |
|
break; |
906 |
|
} |
907 |
|
if (pInstrInfo->name) |
908 |
|
ts << " '" << pInstrInfo->name << "'"; |
909 |
|
ts << endl; |
910 |
|
} // Check for errors... |
911 |
|
else if (::lscp_client_get_errno(m_pClient)) { |
912 |
|
appendMessagesClient("lscp_get_midi_instrument_info"); |
913 |
|
iErrors++; |
914 |
|
} |
915 |
|
// Try to keep it snappy :) |
916 |
|
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
917 |
|
} |
918 |
|
// Check for errors... |
919 |
|
if (pInstrs) |
920 |
|
ts << endl; |
921 |
|
else if (::lscp_client_get_errno(m_pClient)) { |
922 |
|
appendMessagesClient("lscp_list_midi_instruments"); |
923 |
|
iErrors++; |
924 |
|
} |
925 |
|
// MIDI strument index/id mapping. |
926 |
|
midiInstrumentMap[iMidiMap] = iMap; |
927 |
|
} |
928 |
|
// Check for errors... |
929 |
|
if (piMaps == NULL && ::lscp_client_get_errno(m_pClient)) { |
930 |
|
appendMessagesClient("lscp_list_midi_instrument_maps"); |
931 |
|
iErrors++; |
932 |
|
} |
933 |
|
#endif // CONFIG_MIDI_INSTRUMENT |
934 |
|
|
935 |
// Sampler channel mapping. |
// Sampler channel mapping. |
936 |
QWidgetList wlist = m_pWorkspace->windowList(); |
QWidgetList wlist = m_pWorkspace->windowList(); |
937 |
for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { |
for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { |
964 |
ts << pChannel->midiChannel(); |
ts << pChannel->midiChannel(); |
965 |
ts << endl; |
ts << endl; |
966 |
ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannel << endl; |
ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannel << endl; |
967 |
ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannel << endl; |
if (pChannel->instrumentStatus() < 100) ts << "# "; |
968 |
|
ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " |
969 |
|
<< pChannel->instrumentNr() << " " << iChannel << endl; |
970 |
qsamplerChannelRoutingMap::ConstIterator audioRoute; |
qsamplerChannelRoutingMap::ConstIterator audioRoute; |
971 |
for (audioRoute = pChannel->audioRouting().begin(); |
for (audioRoute = pChannel->audioRouting().begin(); |
972 |
audioRoute != pChannel->audioRouting().end(); |
audioRoute != pChannel->audioRouting().end(); |
975 |
<< " " << audioRoute.key() |
<< " " << audioRoute.key() |
976 |
<< " " << audioRoute.data() << endl; |
<< " " << audioRoute.data() << endl; |
977 |
} |
} |
978 |
ts << "SET CHANNEL VOLUME " << iChannel << " " << pChannel->volume() << endl; |
ts << "SET CHANNEL VOLUME " << iChannel |
979 |
|
<< " " << pChannel->volume() << endl; |
980 |
if (pChannel->channelMute()) |
if (pChannel->channelMute()) |
981 |
ts << "SET CHANNEL MUTE " << iChannel << " 1" << endl; |
ts << "SET CHANNEL MUTE " << iChannel << " 1" << endl; |
982 |
if (pChannel->channelSolo()) |
if (pChannel->channelSolo()) |
983 |
ts << "SET CHANNEL SOLO " << iChannel << " 1" << endl; |
ts << "SET CHANNEL SOLO " << iChannel << " 1" << endl; |
984 |
|
#ifdef CONFIG_MIDI_INSTRUMENT |
985 |
|
if (pChannel->midiMap() >= 0) { |
986 |
|
ts << "SET CHANNEL MIDI_INSTRUMENT_MAP " << iChannel |
987 |
|
<< " " << midiInstrumentMap[pChannel->midiMap()] << endl; |
988 |
|
} |
989 |
|
#endif |
990 |
ts << endl; |
ts << endl; |
991 |
} |
} |
992 |
} |
} |
994 |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
995 |
} |
} |
996 |
|
|
|
#ifdef CONFIG_MIDI_INSTRUMENT |
|
|
// MIDI instrument mapping... |
|
|
lscp_midi_instrument_t *pInstrs = ::lscp_list_midi_instruments(m_pClient); |
|
|
if (pInstrs) |
|
|
ts << "# " << tr("MIDI instrument mapping") << endl; |
|
|
for (int iInstr = 0; pInstrs && pInstrs[iInstr].program >= 0; iInstr++) { |
|
|
lscp_midi_instrument_info_t *pInstrInfo |
|
|
= ::lscp_get_midi_instrument_info(m_pClient, &pInstrs[iInstr]); |
|
|
if (pInstrInfo) { |
|
|
ts << "MAP MIDI_INSTRUMENT " |
|
|
<< pInstrs[iInstr].bank_msb << " " |
|
|
<< pInstrs[iInstr].bank_lsb << " " |
|
|
<< pInstrs[iInstr].program << " " |
|
|
<< pInstrInfo->engine_name << " '" |
|
|
<< pInstrInfo->instrument_file << "' " |
|
|
<< pInstrInfo->instrument_nr << " " |
|
|
<< pInstrInfo->volume << " "; |
|
|
switch (pInstrInfo->load_mode) { |
|
|
case LSCP_LOAD_PERSISTENT: |
|
|
ts << "PERSISTENT"; |
|
|
break; |
|
|
case LSCP_LOAD_ON_DEMAND_HOLD: |
|
|
ts << "ON_DEMAND_HOLD"; |
|
|
break; |
|
|
case LSCP_LOAD_ON_DEMAND: |
|
|
case LSCP_LOAD_DEFAULT: |
|
|
default: |
|
|
ts << "ON_DEMAND"; |
|
|
break; |
|
|
} |
|
|
if (pInstrInfo->name) |
|
|
ts << " '" << pInstrInfo->name << "'"; |
|
|
ts << endl; |
|
|
} |
|
|
// Try to keep it snappy :) |
|
|
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
|
|
} |
|
|
if (pInstrs) |
|
|
ts << endl; |
|
|
#endif // CONFIG_MIDI_INSTRUMENT |
|
|
|
|
997 |
// Ok. we've wrote it. |
// Ok. we've wrote it. |
998 |
file.close(); |
file.close(); |
999 |
|
|
1000 |
|
// We're fornerly done. |
1001 |
|
QApplication::restoreOverrideCursor(); |
1002 |
|
|
1003 |
// Have we any errors? |
// Have we any errors? |
1004 |
if (iErrors > 0) |
if (iErrors > 0) |
1005 |
appendMessagesError(tr("Some settings could not be saved\nto \"%1\" session file.\n\nSorry.").arg(sFilename)); |
appendMessagesError(tr("Some settings could not be saved\nto \"%1\" session file.\n\nSorry.").arg(sFilename)); |
1091 |
tr("Reset"), tr("Cancel")) > 0) |
tr("Reset"), tr("Cancel")) > 0) |
1092 |
return; |
return; |
1093 |
|
|
1094 |
|
// Trye closing the current session, first... |
1095 |
|
if (!closeSession(true)) |
1096 |
|
return; |
1097 |
|
|
1098 |
// Just do the reset, after closing down current session... |
// Just do the reset, after closing down current session... |
1099 |
if (closeSession(true) && ::lscp_reset_sampler(m_pClient) != LSCP_OK) { |
if (!resetSession()) |
1100 |
appendMessagesClient("lscp_reset_sampler"); |
return; |
|
appendMessagesError(tr("Could not reset sampler instance.\n\nSorry.")); |
|
|
return; |
|
|
} |
|
1101 |
|
|
1102 |
// Log this. |
// Log this. |
1103 |
appendMessages(tr("Sampler reset.")); |
appendMessages(tr("Sampler reset.")); |
1647 |
// Grab and restore current sampler channels session. |
// Grab and restore current sampler channels session. |
1648 |
void qsamplerMainForm::updateSession (void) |
void qsamplerMainForm::updateSession (void) |
1649 |
{ |
{ |
1650 |
|
#ifdef CONFIG_MIDI_INSTRUMENT |
1651 |
|
// FIXME Make some room for default instrument maps... |
1652 |
|
int iMaps = ::lscp_get_midi_instrument_maps(m_pClient); |
1653 |
|
if (iMaps < 0) |
1654 |
|
appendMessagesClient("lscp_get_midi_instrument_maps"); |
1655 |
|
else if (iMaps < 1) { |
1656 |
|
::lscp_add_midi_instrument_map(m_pClient, tr("Chromatic").latin1()); |
1657 |
|
::lscp_add_midi_instrument_map(m_pClient, tr("Drum Kits").latin1()); |
1658 |
|
} |
1659 |
|
#endif |
1660 |
|
|
1661 |
// Retrieve the current channel list. |
// Retrieve the current channel list. |
1662 |
int *piChannelIDs = ::lscp_list_channels(m_pClient); |
int *piChannelIDs = ::lscp_list_channels(m_pClient); |
1663 |
if (piChannelIDs == NULL) { |
if (piChannelIDs == NULL) { |
1665 |
appendMessagesClient("lscp_list_channels"); |
appendMessagesClient("lscp_list_channels"); |
1666 |
appendMessagesError(tr("Could not get current list of channels.\n\nSorry.")); |
appendMessagesError(tr("Could not get current list of channels.\n\nSorry.")); |
1667 |
} |
} |
1668 |
return; |
} else { |
1669 |
|
// Try to (re)create each channel. |
1670 |
|
m_pWorkspace->setUpdatesEnabled(false); |
1671 |
|
for (int iChannel = 0; piChannelIDs[iChannel] >= 0; iChannel++) { |
1672 |
|
// Check if theres already a channel strip for this one... |
1673 |
|
if (!channelStrip(piChannelIDs[iChannel])) |
1674 |
|
createChannelStrip(new qsamplerChannel(piChannelIDs[iChannel])); |
1675 |
|
} |
1676 |
|
m_pWorkspace->setUpdatesEnabled(true); |
1677 |
} |
} |
1678 |
|
|
1679 |
// Try to (re)create each channel. |
// Do we auto-arrange? |
1680 |
m_pWorkspace->setUpdatesEnabled(false); |
if (m_pOptions && m_pOptions->bAutoArrange) |
1681 |
for (int iChannel = 0; piChannelIDs[iChannel] >= 0; iChannel++) { |
channelsArrange(); |
1682 |
// Check if theres already a channel strip for this one... |
|
|
if (!channelStrip(piChannelIDs[iChannel])) |
|
|
createChannelStrip(new qsamplerChannel(piChannelIDs[iChannel])); |
|
|
// Make it visibly responsive... |
|
|
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
|
|
} |
|
|
m_pWorkspace->setUpdatesEnabled(true); |
|
|
|
|
1683 |
// Remember to refresh devices and instruments... |
// Remember to refresh devices and instruments... |
1684 |
if (m_pInstrumentListForm) |
if (m_pInstrumentListForm) |
1685 |
m_pInstrumentListForm->refreshInstruments(); |
m_pInstrumentListForm->refreshInstruments(); |
1855 |
|
|
1856 |
appendMessagesColor(s.simplifyWhiteSpace(), "#ff0000"); |
appendMessagesColor(s.simplifyWhiteSpace(), "#ff0000"); |
1857 |
|
|
1858 |
|
// Make it look responsive...:) |
1859 |
|
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
1860 |
|
|
1861 |
QMessageBox::critical(this, |
QMessageBox::critical(this, |
1862 |
QSAMPLER_TITLE ": " + tr("Error"), s, tr("Cancel")); |
QSAMPLER_TITLE ": " + tr("Error"), s, tr("Cancel")); |
1863 |
} |
} |
1872 |
appendMessagesColor(s + QString(": %1 (errno=%2)") |
appendMessagesColor(s + QString(": %1 (errno=%2)") |
1873 |
.arg(::lscp_client_get_result(m_pClient)) |
.arg(::lscp_client_get_result(m_pClient)) |
1874 |
.arg(::lscp_client_get_errno(m_pClient)), "#996666"); |
.arg(::lscp_client_get_errno(m_pClient)), "#996666"); |
1875 |
|
|
1876 |
|
// Make it look responsive...:) |
1877 |
|
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
1878 |
} |
} |
1879 |
|
|
1880 |
|
|