#include <QShortcut>
#include <QMenu>
#include <QDesktopWidget>
-#include <QVarLengthArray>
#include <QDrag>
#include <QPainter>
-#include <QtGui/qevent.h>
+#include <QResizeEvent>
#include <klocale.h>
-
-#include <KDebug>
+#include <kdebug.h>
#include <kglobal.h>
#include <kicon.h>
#include <kimageio.h>
#include <kstandarddirs.h>
#include <kstartupinfo.h>
#include <kvbox.h>
-#include <qdebug.h>
#include "regiongrabber.h"
#include "freeregiongrabber.h"
#include "ui_ksnapshotwidget.h"
#ifdef HAVE_X11_EXTENSIONS_XFIXES_H
-#include <X11/extensions/Xfixes.h>
-#include <X11/Xatom.h>
-#include <QX11Info>
+# include <X11/extensions/Xfixes.h>
+# include <X11/Xatom.h>
+# include <QX11Info>
#endif
+#include <vector>
+
class KSnapshotWidget : public QWidget, public Ui::KSnapshotWidget
{
public:
//Annoyingly, xfixes specifies the data to be 32bit, but places it in an unsigned long *
//which can be 64 bit. So we need to iterate over a 64bit structure to put it in a 32bit
//structure.
- QVarLengthArray< quint32 > pixels( xcursorimg->width * xcursorimg->height );
+ std::vector< quint32 > pixels( xcursorimg->width * xcursorimg->height );
for (int i = 0; i < xcursorimg->width * xcursorimg->height; ++i)
pixels[i] = xcursorimg->pixels[i] & 0xffffffff;
#include "page_p.h"
#include <cstring>
+#include <vector>
#include <QtCore/qalgorithms.h>
-#include <QVarLengthArray>
using namespace Okular;
int size_proj_y = node.area().height();
int size_proj_x = node.area().width();
//dynamic memory allocation
- QVarLengthArray<int> proj_on_xaxis(size_proj_x);
- QVarLengthArray<int> proj_on_yaxis(size_proj_y);
+ std::vector<int> proj_on_xaxis(size_proj_x);
+ std::vector<int> proj_on_yaxis(size_proj_y);
for( int j = 0 ; j < size_proj_y ; ++j ) proj_on_yaxis[j] = 0;
for( int j = 0 ; j < size_proj_x ; ++j ) proj_on_xaxis[j] = 0;
#include <qpainter.h>
#include <qpalette.h>
#include <qpixmap.h>
-#include <qvarlengtharray.h>
#include <kiconloader.h>
#include <kdebug.h>
#include <QApplication>
// system includes
#include <math.h>
+#include <vector>
// local includes
#include "core/area.h"
unsigned int * srcData = (unsigned int *)srcImage.bits();
// precalc the x correspondancy conversion in a lookup table
- QVarLengthArray<unsigned int> xOffset( destWidth );
+ std::vector<unsigned int> xOffset( destWidth );
for ( int x = 0; x < destWidth; x++ )
xOffset[ x ] = ((x + destLeft) * srcWidth) / scaledWidth;