summaryrefslogtreecommitdiff
authorzecke <zecke>2004-02-25 20:55:24 (UTC)
committer zecke <zecke>2004-02-25 20:55:24 (UTC)
commitad8cbdb693ecccd2a67a8294014360b70ad4253a (patch) (side-by-side diff)
treec0d3bdc8d3b3d143d195170fee2cc54045840fa6
parentddab47e21543e806a7de978985f77ea2b9e8c214 (diff)
downloadopie-ad8cbdb693ecccd2a67a8294014360b70ad4253a.zip
opie-ad8cbdb693ecccd2a67a8294014360b70ad4253a.tar.gz
opie-ad8cbdb693ecccd2a67a8294014360b70ad4253a.tar.bz2
remove the stupid #ifdef __i386__
We're on Opie and don't need to mess with Qtopia.. we fix up broken Qt usage of legacy via a __weak__ symbol hack
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index 1c613a9..2c0001f 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -401,68 +401,66 @@ void Konsole::init(const char* _pgm, QStrList & _args)
s = s.right( s.length() - i - 1 ) + " [" + s.left( i ) + "]";
}
s[0] = s[0].upper();
QValueList<int> sizes = fontDB.pointSizes( familyNames[j] );
printf("family[%d] = %s with %d sizes\n", j, familyNames[j].latin1(),
sizes.count());
if (sizes.count() > 0)
{
QPopupMenu *sizeMenu;
QFont f;
int last_width = -1;
sizeMenu = NULL;
for(uint i = 0; i < (uint)sizes.count() + 4; i++)
{
// printf("family %s size %d ", familyNames[j].latin1(), sizes[i]);
// need to divide by 10 on the Z, but not otherwise
int size;
if (i >= (uint)sizes.count())
{
// try for expandable fonts
size = sizes[sizes.count()-1] + 2 * (i - sizes.count() + 1);
}
else
{
printf("sizes[%d] = %d\n", i, sizes[i]);
size = sizes[i];
}
-#ifndef __i386__
// a hack, sizes on Z seem to be points*10
size /= 10;
-#endif
f = QFont(familyNames[j], size);
f.setFixedPitch(true);
QFontMetrics fm(f);
// don't trust f.fixedPitch() or f.exactMatch(), they lie!!
if (fm.width("l") == fm.width("m")
&& (i < (uint)sizes.count()
|| fm.width("m") > last_width))
{
if (i < (uint)sizes.count())
{
last_width = fm.width("m");
}
if (sizeMenu == NULL)
{
sizeMenu = new QPopupMenu();
}
int id = sizeMenu->insertItem(QString("%1").arg(size), fontIndex);
sizeMenu->setItemParameter(id, fontIndex);
sizeMenu->connectItem(id, this, SLOT(setFont(int)));
QString name = s + " " + QString::number(size);
fonts.append(new VTFont(name, f, familyNames[j], familyNum, size));
if (familyNames[j] == cfgFontName && size == cfgFontSize)
{
cfont = fontIndex;
}
printf("FOUND: %s family %s size %d\n", name.latin1(), familyNames[j].latin1(), size);
fontIndex++;
}
}
if (sizeMenu)
{