ManualImportWindow.cpp   ManualImportWindow.cpp 
skipping to change at line 34 skipping to change at line 34
#include "ui_manualImportWindow.h" #include "ui_manualImportWindow.h"
#include <QColor> #include <QColor>
#include <QColorDialog> #include <QColorDialog>
#include <QFileDialog> #include <QFileDialog>
#include <QImageReader> #include <QImageReader>
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelUtils.hpp"
//#include "StelTranslator.hpp" //#include "StelTranslator.hpp"
ManualImportWindow::ManualImportWindow() ManualImportWindow::ManualImportWindow()
{ {
ui = new Ui_manualImportWindow(); ui = new Ui_manualImportWindow();
ssoManager = GETSTELMODULE(SolarSystemEditor); ssoManager = GETSTELMODULE(SolarSystemEditor);
} }
ManualImportWindow::~ManualImportWindow() ManualImportWindow::~ManualImportWindow()
{ {
skipping to change at line 237 skipping to change at line 238
QPixmap texture(filePath); QPixmap texture(filePath);
if (texture.isNull()) if (texture.isNull())
{ {
qDebug() << "File doesn't exist or is not an accepted texure format:" qDebug() << "File doesn't exist or is not an accepted texure format:"
<< filePath; << filePath;
return false; return false;
} }
if (!verifyPowerOfTwo(texture.height())) if (!StelUtils::isPowerOfTwo(texture.height()))
{ {
qDebug() << "Invalid texure height:" << texture.height() qDebug() << "Invalid texure height:" << texture.height()
<< "for file" << filePath; << "for file" << filePath;
return false; return false;
} }
if (!verifyPowerOfTwo(texture.width())) if (!StelUtils::isPowerOfTwo(texture.width()))
{ {
qDebug() << "Invalid texture width:" << texture.width() qDebug() << "Invalid texture width:" << texture.width()
<< "for file" << filePath; << "for file" << filePath;
return false; return false;
} }
return true; return true;
} }
bool ManualImportWindow::verifyPowerOfTwo(int value)
{
if (value > 0 && (value & (value-1)) == 0)
return true;
else
return false;
}
 End of changes. 4 change blocks. 
2 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/