Disclosed are compounds of formula I or pharmaceutically acceptable salts thereof: Wherein n, R1, R2, R3, R4, R5, A, Q and X are as defined in the description. These compounds selectively modulate, regulate, and/or inhibit signal transduction mediated by certain native and/or mutant protein kinases implicated in a variety of human and animal diseases such as cell proliferative, metabolic, allergic, and degenerative disorders. More particularly, these compounds are potent and selective native and/or mutant c-kit inhibitors.