 The purpose of this study is to assess the efficacy of flexibly dosed JNJ-42847922 20 milligram mg or 40 mg compared to flexibly dosed quetiapine extended-release XR 150 mg or 300 mg as adjunctive therapy to an antidepressant drug in delaying time to all-cause discontinuation of study drug over a 6-month treatment period, in participants with major depressive disorder MDD who have had an inadequate response to current antidepressant therapy with a selective serotonin reuptake inhibitor SSRI or serotonin-norepinephrine reuptake inhibitor SNRI. 