/[svn]/qsampler/trunk/src/qsamplerInstrumentList.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerInstrumentList.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3520 by capela, Mon Jul 1 10:53:41 2019 UTC revision 3555 by capela, Tue Aug 13 10:19:32 2019 UTC
# Line 1  Line 1 
1  // qsamplerInstrumentList.cpp  // qsamplerInstrumentList.cpp
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2003-2015, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2003-2019, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, Christian Schoenebeck     Copyright (C) 2007, Christian Schoenebeck
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
# Line 112  QVariant InstrumentListModel::data ( Line 112  QVariant InstrumentListModel::data (
112  QModelIndex InstrumentListModel::index (  QModelIndex InstrumentListModel::index (
113          int row, int col, const QModelIndex& /*parent*/ ) const          int row, int col, const QModelIndex& /*parent*/ ) const
114  {  {
115          const Instrument *pInstr = NULL;          const Instrument *pInstr = nullptr;
116    
117          if (m_iMidiMap == LSCP_MIDI_MAP_ALL) {          if (m_iMidiMap == LSCP_MIDI_MAP_ALL) {
118                  int nrows = 0;                  int nrows = 0;
# Line 216  const Instrument *InstrumentListModel::a Line 216  const Instrument *InstrumentListModel::a
216                  list.insert(i, pInstr);                  list.insert(i, pInstr);
217          } else {          } else {
218                  delete pInstr;                  delete pInstr;
219                  pInstr = NULL;                  pInstr = nullptr;
220          }          }
221    
222          return pInstr;          return pInstr;
# Line 264  void InstrumentListModel::resortInstrume Line 264  void InstrumentListModel::resortInstrume
264  void InstrumentListModel::refresh (void)  void InstrumentListModel::refresh (void)
265  {  {
266          MainForm *pMainForm = MainForm::getInstance();          MainForm *pMainForm = MainForm::getInstance();
267          if (pMainForm == NULL)          if (pMainForm == nullptr)
268                  return;                  return;
269          if (pMainForm->client() == NULL)          if (pMainForm->client() == nullptr)
270                  return;                  return;
271    
272          QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));          QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
# Line 287  void InstrumentListModel::refresh (void) Line 287  void InstrumentListModel::refresh (void)
287    
288          QApplication::restoreOverrideCursor();          QApplication::restoreOverrideCursor();
289    
290          if (pInstrs == NULL && ::lscp_client_get_errno(pMainForm->client())) {          if (pInstrs == nullptr && ::lscp_client_get_errno(pMainForm->client())) {
291                  pMainForm->appendMessagesClient("lscp_list_midi_instruments");                  pMainForm->appendMessagesClient("lscp_list_midi_instruments");
292                  pMainForm->appendMessagesError(                  pMainForm->appendMessagesError(
293                          tr("Could not get current list of MIDI instrument mappings.\n\nSorry."));                          tr("Could not get current list of MIDI instrument mappings.\n\nSorry."));

Legend:
Removed from v.3520  
changed lines
  Added in v.3555

  ViewVC Help
Powered by ViewVC