MCPcopy Create free account
hub / github.com/KDE/kdevelop / configForIndex

Method configForIndex

kdevplatform/shell/launchconfigurationdialog.cpp:793–809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

791}
792
793LaunchConfiguration* LaunchConfigurationsModel::configForIndex(const QModelIndex& idx ) const
794{
795 if( idx.isValid() )
796 {
797 auto* item = dynamic_cast<LaunchItem*>( static_cast<TreeItem*>( idx.internalPointer() ) );
798 if( item )
799 {
800 return item->launch;
801 }
802 auto* lmitem = dynamic_cast<LaunchModeItem*>( static_cast<TreeItem*>( idx.internalPointer() ) );
803 if( lmitem )
804 {
805 return dynamic_cast<LaunchItem*>( lmitem->parent )->launch;
806 }
807 }
808 return nullptr;
809}
810
811QModelIndex LaunchConfigurationsModel::indexForConfig( LaunchConfiguration* l ) const
812{

Callers 4

selectionChangedMethod · 0.80
createEditorMethod · 0.80
setEditorDataMethod · 0.80
setModelDataMethod · 0.80

Calls 1

isValidMethod · 0.45

Tested by

no test coverage detected