     catch error
       switch error.code
         when 'CANCELLED'
-          return Q()
+          return Promise.resolve()
         when 'EACCES'
           atom.notifications.addWarning("Permission denied '#{error.path}'")
-          return Q()
+          return Promise.resolve()
         when 'EPERM', 'EBUSY', 'ENXIO', 'EIO', 'ENOTCONN', 'UNKNOWN', 'ECONNRESET', 'EINVAL'
           atom.notifications.addWarning("Unable to open '#{error.path ? uri}'", detail: error.message)
-          return Q()
+          return Promise.resolve()
         else
           throw error
 
-    Q(item)
+    Promise.resolve(item)
       .then (item) =>
         if not pane
           pane = new Pane(items: [item])

_ = require 'underscore-plus'
path = require 'path'
{join} = path
Q = require 'q'
Serializable = require 'serializable'
{Emitter, Disposable, CompositeDisposable} = require 'event-kit'
Grim = require 'grim'

    if uri = @destroyedItemURIs.pop()
      @open(uri)
    else
      Promise.resolve()

  # Public: Register an opener for a uri.
  #
