const AttachmentStrategy * AttachmentStrategy::create( const QString & type ) { QString lowerType = type.toLower(); if ( lowerType == "iconic" ) return iconic(); //if ( lowerType == "smart" ) return smart(); // not needed, see below if ( lowerType == "inlined" ) return inlined(); if ( lowerType == "hidden" ) return hidden(); // don't kFatal here, b/c the strings are user-provided // (KConfig), so fail gracefully to the default: return smart(); }
void testInlined() { extern int coin(); int cond = coin(); if (!cond) { inlined(0); if (cond) { foo(5); // expected-warning {{never executed}} } } }
const AttachmentStrategy * AttachmentStrategy::create( Type type ) { switch ( type ) { case Iconic: return iconic(); case Smart: return smart(); case Inlined: return inlined(); case Hidden: return hidden(); } kFatal( 5006 ) << "Unknown attachment startegy ( type ==" << (int)type << ") requested!"; return 0; // make compiler happy }
const AttachmentStrategy * next() const { return inlined(); }
const AttachmentStrategy * prev() const { return inlined(); }
void inline_me (void) { inlined(); }
void inline_me_too (void) { inlined(); }