Blueshifts of the emission energy in type-II quantum dot and quantum ring nanostructures