_scrollBarsEnabled(true),
_pasteProtectionEnabled(true),
_emacsMode(false),
_scrollBarsEnabled(true),
_pasteProtectionEnabled(true),
_emacsMode(false),
connect(this, SIGNAL(textChanged()), this, SLOT(on_textChanged()));
_mircColorMap["00"] = "#ffffff";
connect(this, SIGNAL(textChanged()), this, SLOT(on_textChanged()));
_mircColorMap["00"] = "#ffffff";
// use the style to determine a decent size
int h = qMin(qMax((int)document()->size().height() + scrollBarHeight, minPixelHeight), maxPixelHeight) + 2 * frameWidth();
// use the style to determine a decent size
int h = qMin(qMax((int)document()->size().height() + scrollBarHeight, minPixelHeight), maxPixelHeight) + 2 * frameWidth();
opt.initFrom(this);
opt.rect = QRect(0, 0, 100, h);
opt.lineWidth = lineWidth();
opt.midLineWidth = midLineWidth();
opt.state |= QStyle::State_Sunken;
opt.initFrom(this);
opt.rect = QRect(0, 0, 100, h);
opt.lineWidth = lineWidth();
opt.midLineWidth = midLineWidth();
opt.state |= QStyle::State_Sunken;
- QSize s = style()->sizeFromContents(QStyle::CT_LineEdit, &opt, QSize(100, h).expandedTo(QApplication::globalStrut()), this);
+ QWidget *widget = this;
+#ifdef Q_OS_MAC
+ widget = 0;
+#endif
+ QSize s = style()->sizeFromContents(QStyle::CT_LineEdit, &opt, QSize(100, h).expandedTo(QApplication::globalStrut()), widget);
QString newText = text();
newText.replace("\r\n", "\n");
newText.replace('\r', '\n');
QString newText = text();
newText.replace("\r\n", "\n");
newText.replace('\r', '\n');
QString msg = tr("Do you really want to paste %n line(s)?", "", lines.count());
msg += "<p>";
for (int i = 0; i < 4; i++) {
QString msg = tr("Do you really want to paste %n line(s)?", "", lines.count());
msg += "<p>";
for (int i = 0; i < 4; i++) {